vkd3d-shader/hlsl: Clean up the static_initializers block when the context is destroyed (Valgrind).

This is currently leaked if we fail parsing before reaching codegen.
This commit is contained in:
Zebediah Figura 2023-06-30 17:41:20 -05:00 committed by Alexandre Julliard
parent b22e2113a6
commit 4ae00cea43
Notes: Alexandre Julliard 2023-08-08 21:47:28 +09:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/290

View File

@ -3377,6 +3377,8 @@ static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx)
struct hlsl_type *type, *next_type;
unsigned int i;
hlsl_block_cleanup(&ctx->static_initializers);
for (i = 0; i < ctx->source_files_count; ++i)
vkd3d_free((void *)ctx->source_files[i]);
vkd3d_free(ctx->source_files);