mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Fix a few memory leaks.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
1502740d5b
commit
d6d6971fc9
@@ -2973,6 +2973,7 @@ postfix_expr:
|
|||||||
{
|
{
|
||||||
hlsl_error(ctx, @1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
hlsl_error(ctx, @1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
||||||
"Modifiers are not allowed on constructors.");
|
"Modifiers are not allowed on constructors.");
|
||||||
|
free_parse_initializer(&$4);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
if ($2->type > HLSL_CLASS_LAST_NUMERIC)
|
if ($2->type > HLSL_CLASS_LAST_NUMERIC)
|
||||||
@@ -2983,6 +2984,7 @@ postfix_expr:
|
|||||||
hlsl_error(ctx, @2, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
|
hlsl_error(ctx, @2, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
|
||||||
"Constructor data type %s is not numeric.", string->buffer);
|
"Constructor data type %s is not numeric.", string->buffer);
|
||||||
hlsl_release_string_buffer(ctx, string);
|
hlsl_release_string_buffer(ctx, string);
|
||||||
|
free_parse_initializer(&$4);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
if ($2->dimx * $2->dimy != initializer_size(&$4))
|
if ($2->dimx * $2->dimy != initializer_size(&$4))
|
||||||
@@ -2990,6 +2992,7 @@ postfix_expr:
|
|||||||
hlsl_error(ctx, @4, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
|
hlsl_error(ctx, @4, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
|
||||||
"Expected %u components in constructor, but got %u.",
|
"Expected %u components in constructor, but got %u.",
|
||||||
$2->dimx * $2->dimy, initializer_size(&$4));
|
$2->dimx * $2->dimy, initializer_size(&$4));
|
||||||
|
free_parse_initializer(&$4);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user