mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
anv: don't forget to destroy device->vma_mutex
This actually doesn't fix any bugs or leaks, because according to the man page: "In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked. still, it's better to have it than not to have it, especially since other implementations may do something. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
This commit is contained in:
parent
0a072bb31c
commit
e1b50074fe
1 changed files with 2 additions and 0 deletions
|
|
@ -3674,6 +3674,7 @@ VkResult anv_CreateDevice(
|
|||
util_vma_heap_finish(&device->vma_hi);
|
||||
util_vma_heap_finish(&device->vma_cva);
|
||||
util_vma_heap_finish(&device->vma_lo);
|
||||
pthread_mutex_destroy(&device->vma_mutex);
|
||||
fail_queues:
|
||||
for (uint32_t i = 0; i < device->queue_count; i++)
|
||||
anv_queue_finish(&device->queues[i]);
|
||||
|
|
@ -3785,6 +3786,7 @@ void anv_DestroyDevice(
|
|||
util_vma_heap_finish(&device->vma_hi);
|
||||
util_vma_heap_finish(&device->vma_cva);
|
||||
util_vma_heap_finish(&device->vma_lo);
|
||||
pthread_mutex_destroy(&device->vma_mutex);
|
||||
|
||||
pthread_cond_destroy(&device->queue_submit);
|
||||
pthread_mutex_destroy(&device->mutex);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue