Module: Mesa Branch: main Commit: fd28984f84af64ecb59851c4ea56324dd5a1cbc4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd28984f84af64ecb59851c4ea56324dd5a1cbc4
Author: Eric Engestrom <[email protected]> Date: Fri Aug 12 09:31:20 2022 +0100 pvr: fix memleak in error paths Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Karmjit Mahil <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18027> --- src/imagination/vulkan/pvr_queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_queue.c b/src/imagination/vulkan/pvr_queue.c index 2e9e84ad1f6..d74c1571dde 100644 --- a/src/imagination/vulkan/pvr_queue.c +++ b/src/imagination/vulkan/pvr_queue.c @@ -214,8 +214,10 @@ pvr_process_graphics_cmd(struct pvr_device *device, 0U, 0UL, &sync_geom); - if (result != VK_SUCCESS) + if (result != VK_SUCCESS) { + STACK_ARRAY_FINISH(bos); return result; + } result = vk_sync_create(&device->vk, &device->pdevice->ws->syncobj_type, @@ -224,6 +226,7 @@ pvr_process_graphics_cmd(struct pvr_device *device, &sync_frag); if (result != VK_SUCCESS) { vk_sync_destroy(&device->vk, sync_geom); + STACK_ARRAY_FINISH(bos); return result; }
