anv: Clean up anv_device_memory::base on failure

Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
This commit is contained in:
Jason Ekstrand 2021-04-08 16:10:26 -05:00 committed by Marge Bot
parent fcd8aaf07a
commit e20c653781
1 changed files with 1 additions and 0 deletions

View File

@ -3935,6 +3935,7 @@ VkResult anv_AllocateMemory(
return VK_SUCCESS;
fail:
vk_object_base_finish(&mem->base);
vk_free2(&device->vk.alloc, pAllocator, mem);
return result;