anv: Clean up anv_descriptor_pool::base on the error path

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>
(cherry picked from commit 46749afe45)
This commit is contained in:
Jason Ekstrand 2021-04-08 16:27:02 -05:00 committed by Dylan Baker
parent e93f15f885
commit 687e56af76
2 changed files with 2 additions and 1 deletions

View file

@ -1957,7 +1957,7 @@
"description": "anv: Clean up anv_descriptor_pool::base on the error path",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "682c81bdfb7ea28efccea1e8cbfeb7cfc67d02b8"
},

View file

@ -873,6 +873,7 @@ VkResult anv_CreateDescriptorPool(
0 /* explicit_address */,
&pool->bo);
if (result != VK_SUCCESS) {
vk_object_base_finish(&pool->base);
vk_free2(&device->vk.alloc, pAllocator, pool);
return result;
}