radv: fix missing destroy for the overallocation mutex
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jan 2022 09:35:56 +0000 (10:35 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Jan 2022 16:47:56 +0000 (16:47 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14611>

src/amd/vulkan/radv_device.c

index f419095..030ece0 100644 (file)
@@ -3315,6 +3315,8 @@ fail:
          device->ws->ctx_destroy(device->hw_ctx[i]);
    }
 
+   mtx_destroy(&device->overallocation_mutex);
+
    vk_device_finish(&device->vk);
    vk_free(&device->vk.alloc, device);
    return result;
@@ -3351,6 +3353,8 @@ radv_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
          device->ws->ctx_destroy(device->hw_ctx[i]);
    }
 
+   mtx_destroy(&device->overallocation_mutex);
+
    radv_device_finish_meta(device);
 
    VkPipelineCache pc = radv_pipeline_cache_to_handle(device->mem_cache);