From 6e370777b484237f94800ec95c7b241755697b33 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 27 Jul 2023 00:42:46 -0500 Subject: [PATCH] vkd3d-shader/d3dbc: Free vkd3d_bytecode_buffer data on failure. --- libs/vkd3d-shader/d3dbc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d-shader/d3dbc.c index 34dc4bab..91910850 100644 --- a/libs/vkd3d-shader/d3dbc.c +++ b/libs/vkd3d-shader/d3dbc.c @@ -2460,5 +2460,9 @@ int hlsl_sm1_write(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun out->code = buffer.data; out->size = buffer.size; } + else + { + vkd3d_free(buffer.data); + } return ret; }