vkd3d-shader/hlsl: Free variable identifiers in primary_expr (Valgrind).

This commit is contained in:
Giovanni Mascellani 2024-02-01 12:18:33 +01:00 committed by Alexandre Julliard
parent 5c917552c9
commit 521082afbe
Notes: Alexandre Julliard 2024-02-09 22:56:13 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/622

View File

@ -6992,8 +6992,10 @@ primary_expr:
if (!(var = hlsl_get_var(ctx->cur_scope, $1)))
{
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Variable \"%s\" is not defined.", $1);
vkd3d_free($1);
YYABORT;
}
vkd3d_free($1);
if (!(load = hlsl_new_var_load(ctx, var, &@1)))
YYABORT;
if (!($$ = make_block(ctx, &load->node)))