From 346b62bc70fcda3e314c5198b109bfd8b297631c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 15 Oct 2025 15:52:12 +0200 Subject: [PATCH] vkd3d-shader/spirv: Free the output on failure in spirv_compiler_generate_spirv(). --- libs/vkd3d-shader/spirv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index c4f21f016..1ea9c1bf1 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -11052,7 +11052,11 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler, } if (compiler->failed) + { + vkd3d_shader_free_shader_code(spirv); + return VKD3D_ERROR_INVALID_SHADER; + } if (compile_info->target_type == VKD3D_SHADER_TARGET_SPIRV_TEXT) {