mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
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>
(cherry picked from commit ee3f17ca79)
This commit is contained in:
parent
e887283d70
commit
032ed1f999
2 changed files with 5 additions and 1 deletions
|
|
@ -3064,7 +3064,7 @@
|
|||
"description": "venus: fix a cmd tmp storage leak",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -638,6 +638,10 @@ vn_DestroyCommandPool(VkDevice device,
|
|||
&pool->command_buffers, head) {
|
||||
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);
|
||||
|
||||
vk_free(alloc, cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue