From 7bb34ecff9833e0b490e90ab04fdaa6342eadc1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Fri, 8 Mar 2019 10:29:26 +0200 Subject: [PATCH] anv: release memory allocated by bo_heap when descriptor pool is destroyed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes following leak: ==21853== 32 bytes in 1 blocks are definitely lost in loss record 2 of 20 ==21853== at 0x483AB1A: calloc (vg_replace_malloc.c:762) ==21853== by 0x4C4DD7F: util_vma_heap_free (vma.c:221) ==21853== by 0x4C4D647: util_vma_heap_init (vma.c:46) ==21853== by 0x4957B9F: anv_CreateDescriptorPool (anv_descriptor_set.c:578) Fixes: c520f4dec9cb ("anv: Add a concept of a descriptor buffer") Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_descriptor_set.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 75ab643f475..f293cf469ee 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -614,6 +614,8 @@ void anv_DestroyDescriptorPool( anv_descriptor_set_destroy(device, pool, set); } + util_vma_heap_finish(&pool->bo_heap); + vk_free2(&device->alloc, pAllocator, pool); } -- 2.30.2