panvk: Call vk_free on queue array instead of vk_object_free
This is allocated using vk_alloc and isn't a vk_object.
This fixes an invalid free that could manifest as a double free error.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 5b0ff2643f
("panvk: Make the device creation/destruction per-arch")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
This commit is contained in:
@@ -366,7 +366,7 @@ err_finish_queues:
|
||||
for (unsigned q = 0; q < device->queue_count[i]; q++)
|
||||
panvk_per_arch(queue_finish)(&device->queues[i][q]);
|
||||
if (device->queues[i])
|
||||
vk_object_free(&device->vk, NULL, device->queues[i]);
|
||||
vk_free(&device->vk.alloc, device->queues[i]);
|
||||
}
|
||||
|
||||
panvk_meta_cleanup(device);
|
||||
@@ -402,7 +402,7 @@ panvk_per_arch(destroy_device)(struct panvk_device *device,
|
||||
for (unsigned q = 0; q < device->queue_count[i]; q++)
|
||||
panvk_per_arch(queue_finish)(&device->queues[i][q]);
|
||||
if (device->queue_count[i])
|
||||
vk_object_free(&device->vk, NULL, device->queues[i]);
|
||||
vk_free(&device->vk.alloc, device->queues[i]);
|
||||
}
|
||||
|
||||
panvk_meta_cleanup(device);
|
||||
|
Reference in New Issue
Block a user