From b28396542757cbe51b447f0cfb85dfd1bec07ff3 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 23 Jan 2021 04:31:08 -0600 Subject: [PATCH] lavapipe: Properly clean up vk_device Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index af1404aa073..da9d29029e5 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -947,6 +947,7 @@ VkResult lvp_CreateDevice( const char *ext_name = pCreateInfo->ppEnabledExtensionNames[i]; int index = lvp_get_device_extension_index(ext_name); if (index < 0 || !physical_device->supported_extensions.extensions[index]) { + vk_device_finish(&device->vk); vk_free(&device->vk.alloc, device); return vk_error(physical_device->instance, VK_ERROR_EXTENSION_NOT_PRESENT); } @@ -973,6 +974,7 @@ void lvp_DestroyDevice( LVP_FROM_HANDLE(lvp_device, device, _device); lvp_queue_finish(&device->queue); + vk_device_finish(&device->vk); vk_free(&device->vk.alloc, device); }