From 28e172e9566c1edd2a181265988be630ad897b98 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Fri, 24 Oct 2025 11:21:18 +0200 Subject: [PATCH] hk: Remove unused allocation in queue_submit Unused and leaking memory, found with address sanitizer. Fixes: c64a2bbff5a3 ("asahi: port to stable uAPI") Signed-off-by: Mary Guillemard Acked-by: Alyssa Rosenzweig (cherry picked from commit 64131475a8371105a923e021299f6d8306654c53) Part-of: --- .pick_status.json | 2 +- src/asahi/vulkan/hk_queue.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8912e1570f4..0df30dcb455 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -704,7 +704,7 @@ "description": "hk: Remove unused allocation in queue_submit", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c64a2bbff5a3370bca7f40d6c9f41fb3cd6cf4ba", "notes": null diff --git a/src/asahi/vulkan/hk_queue.c b/src/asahi/vulkan/hk_queue.c index 6cfffe81254..520c045d1d9 100644 --- a/src/asahi/vulkan/hk_queue.c +++ b/src/asahi/vulkan/hk_queue.c @@ -812,11 +812,6 @@ queue_submit(struct hk_device *dev, struct hk_queue *queue, /* Now setup the command structs */ struct util_dynarray payload; util_dynarray_init(&payload, NULL); - union drm_asahi_cmd *cmds = malloc(sizeof(*cmds) * command_count); - if (cmds == NULL) { - free(cmds); - return vk_error(dev, VK_ERROR_OUT_OF_HOST_MEMORY); - } unsigned nr_vdm = 0, nr_cdm = 0;