panvk: Fix a memory leak in the descriptor set logic

The desc_heap field is unconditionally initialized, so we need to
call util_vma_heap_finish() on it.

Fixes: ec02137c86 ("panvk: Support DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
This commit is contained in:
Boris Brezillon 2025-12-12 14:31:21 +01:00
parent 8b6e4c68d6
commit 29d173060e

View file

@ -307,6 +307,7 @@ panvk_destroy_descriptor_pool(struct panvk_device *device,
util_vma_heap_finish(&pool->desc_heap);
panvk_priv_bo_unref(pool->desc_bo);
} else if (pool->host_only_mem) {
util_vma_heap_finish(&pool->desc_heap);
vk_free2(&device->vk.alloc, pAllocator, (void *)pool->host_only_mem);
pool->host_only_mem = 0;
}