From d6d6971fc9790c0667da0ba4c7b55c3979545561 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Mon, 27 Sep 2021 14:41:32 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Fix a few memory leaks. Signed-off-by: Giovanni Mascellani Signed-off-by: Henri Verbeet Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 19745e72..b2d5ba27 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2973,6 +2973,7 @@ postfix_expr: { hlsl_error(ctx, @1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER, "Modifiers are not allowed on constructors."); + free_parse_initializer(&$4); YYABORT; } if ($2->type > HLSL_CLASS_LAST_NUMERIC) @@ -2983,6 +2984,7 @@ postfix_expr: hlsl_error(ctx, @2, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Constructor data type %s is not numeric.", string->buffer); hlsl_release_string_buffer(ctx, string); + free_parse_initializer(&$4); YYABORT; } 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, "Expected %u components in constructor, but got %u.", $2->dimx * $2->dimy, initializer_size(&$4)); + free_parse_initializer(&$4); YYABORT; }