anv/image: Fix cleanup of failed image creation

In anv_image_create(), the failure path neglected to call
vk_object_base_finish().

CC: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466>
(cherry picked from commit c21dc4101a)
This commit is contained in:
Chad Versace 2021-04-01 11:34:23 -07:00 committed by Dylan Baker
parent ce5cd85211
commit 12474ad091
2 changed files with 3 additions and 4 deletions

View file

@ -139,7 +139,7 @@
"description": "anv/image: Fix cleanup of failed image creation",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -853,9 +853,8 @@ anv_image_create(VkDevice _device,
return VK_SUCCESS;
fail:
if (image)
vk_free2(&device->vk.alloc, alloc, image);
vk_object_base_finish(&image->base);
vk_free2(&device->vk.alloc, alloc, image);
return r;
}