From 71d8ff85c6607d1ef74505a0d08d8008600e4879 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 5 Apr 2023 15:16:00 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Avoid leaking the allocator register map in allocate_const_registers(). --- libs/vkd3d-shader/hlsl_codegen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 3a575b6f..a2f3242a 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -3074,6 +3074,8 @@ static void allocate_const_registers(struct hlsl_ctx *ctx, struct hlsl_ir_functi debug_register('c', var->regs[HLSL_REGSET_NUMERIC], var->data_type)); } } + + vkd3d_free(allocator.regs); } /* Simple greedy temporary register allocation pass that just assigns a unique