panvk: Add missing vk_device_finish() calls

We do free the device object, but never call vk_device_finish() on
it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
This commit is contained in:
Boris Brezillon
2024-06-28 09:19:52 +02:00
committed by Marge Bot
parent fd8700b793
commit 8eec3284e1

View File

@@ -152,7 +152,7 @@ panvk_per_arch(create_device)(struct panvk_physical_device *physical_device,
if (!device->kmod.dev) {
result = vk_errorf(instance, panvk_errno_to_vk_error(), "cannot create device");
goto err_free_dev;
goto err_finish_dev;
}
if (instance->debug_flags &
@@ -257,6 +257,9 @@ err_free_priv_bos:
err_destroy_kdev:
pan_kmod_dev_destroy(device->kmod.dev);
err_finish_dev:
vk_device_finish(&device->vk);
err_free_dev:
vk_free(&device->vk.alloc, device);
return result;
@@ -287,6 +290,7 @@ panvk_per_arch(destroy_device)(struct panvk_device *device,
pandecode_destroy_context(device->debug.decode_ctx);
pan_kmod_dev_destroy(device->kmod.dev);
vk_device_finish(&device->vk);
vk_free(&device->vk.alloc, device);
}