[PATCH vkd3d] vkd3d-shader/hlsl: Cleanup HLSL context during error path.

Giovanni Mascellani gmascellani at codeweavers.com
Mon Aug 30 01:53:35 CDT 2021


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 libs/vkd3d-shader/hlsl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 0d9186ae..40731e67 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -1821,6 +1821,7 @@ int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d
 
         hlsl_error(&ctx, loc, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED,
                 "Entry point \"%s\" is not defined.", entry_point);
+        hlsl_ctx_cleanup(&ctx);
         return VKD3D_ERROR_INVALID_SHADER;
     }
 
-- 
2.33.0




More information about the wine-devel mailing list