Module: vkd3d Branch: master Commit: 6e370777b484237f94800ec95c7b241755697b33 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/6e370777b484237f94800ec95c7b24...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Jul 27 00:42:46 2023 -0500
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; }