Module: Mesa
Branch: main
Commit: 17e135d3d4a4bb1d835aba6ffdf1997e23360843
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17e135d3d4a4bb1d835aba6ffdf1997e23360843

Author: Paulo Zanoni <paulo.r.zan...@intel.com>
Date:   Fri Sep  8 15:10:33 2023 -0700

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 <karmjit.ma...@imgtec.com>
Reviewed-by: Faith Ekstrand <faith.ekstr...@collabora.com>
Signed-off-by: Paulo Zanoni <paulo.r.zan...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26041>

---

 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;
 }

Reply via email to