pvr: fix memleak in error paths

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18027>
This commit is contained in:
Eric Engestrom
2022-08-12 09:31:20 +01:00
committed by Marge Bot
parent c69ba3159a
commit fd28984f84

View File

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