Skip to content

Commit fad877a

Browse files
committed
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 <liam.r.girdwood@linux.intel.com>
1 parent 3f7738d commit fad877a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/idc/idc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ static int idc_prepare(uint32_t comp_id)
199199
dev->ipc_config.core, 0);
200200
if (ret < 0) {
201201
sof_heap_free(dev->drv->user_heap, dev->task);
202+
dev->task = NULL;
202203
goto out;
203204
}
204205
}

0 commit comments

Comments
 (0)