From 17e135d3d4a4bb1d835aba6ffdf1997e23360843 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Fri, 8 Sep 2023 15:10:33 -0700 Subject: [PATCH] vulkan: fix potential memory leak in create_rect_list_pipeline() I was playing around with possible improvements to STACK_ARRAY(), and one of my experiments made gcc point us that we were not freeing 'stages'. Fixes: 514c10344e6f ("vulkan/meta: Add a concept of rect pipelines") Reviewed-by: Karmjit Mahil Reviewed-by: Faith Ekstrand Signed-off-by: Paulo Zanoni Part-of: --- src/vulkan/runtime/vk_meta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vulkan/runtime/vk_meta.c b/src/vulkan/runtime/vk_meta.c index 1ea4dc77b0e..f1570908fb9 100644 --- a/src/vulkan/runtime/vk_meta.c +++ b/src/vulkan/runtime/vk_meta.c @@ -398,6 +398,7 @@ create_rect_list_pipeline(struct vk_device *device, pipeline_out); STACK_ARRAY_FINISH(dyn_state); + STACK_ARRAY_FINISH(stages); return result; }