From fad877ab26eae3cfa322555fb2f545a0e9a85669 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 11 Jun 2026 14:31:03 +0100 Subject: [PATCH] idc: clear task pointer after free on prepare error On task init failure the task allocation was freed but the pointer left set, allowing a later free path to free it again. Clear the pointer after freeing. Signed-off-by: Liam Girdwood --- src/idc/idc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/idc/idc.c b/src/idc/idc.c index bafa44299073..65c614896dd7 100644 --- a/src/idc/idc.c +++ b/src/idc/idc.c @@ -199,6 +199,7 @@ static int idc_prepare(uint32_t comp_id) dev->ipc_config.core, 0); if (ret < 0) { sof_heap_free(dev->drv->user_heap, dev->task); + dev->task = NULL; goto out; } }