mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Free the selector in postfix_expr (Valgrind).
This commit is contained in:
committed by
Alexandre Julliard
parent
a10de1b239
commit
5905489b7f
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
@@ -7073,12 +7073,17 @@ postfix_expr:
|
|||||||
if (!(field = get_struct_field(type->e.record.fields, type->e.record.field_count, $3)))
|
if (!(field = get_struct_field(type->e.record.fields, type->e.record.field_count, $3)))
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Field \"%s\" is not defined.", $3);
|
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Field \"%s\" is not defined.", $3);
|
||||||
|
vkd3d_free($3);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
field_idx = field - type->e.record.fields;
|
field_idx = field - type->e.record.fields;
|
||||||
if (!add_record_access(ctx, $1, node, field_idx, &@2))
|
if (!add_record_access(ctx, $1, node, field_idx, &@2))
|
||||||
|
{
|
||||||
|
vkd3d_free($3);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
}
|
||||||
|
vkd3d_free($3);
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
else if (hlsl_is_numeric_type(node->data_type))
|
else if (hlsl_is_numeric_type(node->data_type))
|
||||||
@@ -7088,14 +7093,17 @@ postfix_expr:
|
|||||||
if (!(swizzle = get_swizzle(ctx, node, $3, &@3)))
|
if (!(swizzle = get_swizzle(ctx, node, $3, &@3)))
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid swizzle \"%s\".", $3);
|
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid swizzle \"%s\".", $3);
|
||||||
|
vkd3d_free($3);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
hlsl_block_add_instr($1, swizzle);
|
hlsl_block_add_instr($1, swizzle);
|
||||||
|
vkd3d_free($3);
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid subscript \"%s\".", $3);
|
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid subscript \"%s\".", $3);
|
||||||
|
vkd3d_free($3);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user