anv: Clean up the vk_device on the CreateDevice error path
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jan 2021 10:33:02 +0000 (04:33 -0600)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Feb 2021 18:54:23 +0000 (18:54 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>

src/intel/vulkan/anv_device.c

index d904633..6986540 100644 (file)
@@ -3238,6 +3238,7 @@ VkResult anv_CreateDevice(
  fail_fd:
    close(device->fd);
  fail_device:
+   vk_device_finish(&device->vk);
    vk_free(&device->vk.alloc, device);
 
    return result;