venus: fix a cmd tmp storage leak

When the pool is destroyed, cmds are implicitly freed. Cmd level allocs
have to be cleaned up to avoid leak.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009>
This commit is contained in:
Yiwei Zhang
2023-07-04 14:44:49 -07:00
committed by Marge Bot
parent 87b99bf470
commit ee3f17ca79

View File

@@ -701,6 +701,9 @@ vn_DestroyCommandPool(VkDevice device,
vn_cs_encoder_fini(&cmd->cs);
vn_object_base_fini(&cmd->base);
if (cmd->builder.tmp.data)
vk_free(&cmd->allocator, cmd->builder.tmp.data);
list_for_each_entry_safe(struct vn_command_buffer_query_batch, batch,
&cmd->query_batches, head) {
list_del(&batch->head);