turnip: Free event->bo on vkDestroyEvent
authorBrian Ho <brian@brkho.com>
Thu, 30 Jan 2020 16:02:29 +0000 (11:02 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jan 2020 18:50:06 +0000 (18:50 +0000)
Fixes a leak from freeing event but not event->bo.

Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3639>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3639>

src/freedreno/vulkan/tu_device.c

index 8dfb288b02873b442aeb6c2485da0068cc7fb753..b91df7c4411526b817b1a96664d3f91282129a0e 100644 (file)
@@ -1761,6 +1761,8 @@ tu_DestroyEvent(VkDevice _device,
 
    if (!event)
       return;
+
+   tu_bo_finish(device, &event->bo);
    vk_free2(&device->alloc, pAllocator, event);
 }