Skip to content

Commit 9d914c0

Browse files
lrgirdwolgirdwood
authored andcommitted
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 26b1379 commit 9d914c0

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
@@ -200,6 +200,7 @@ static int idc_prepare(uint32_t comp_id)
200200
dev->ipc_config.core, 0);
201201
if (ret < 0) {
202202
sof_heap_free(dev->drv->user_heap, dev->task);
203+
dev->task = NULL;
203204
goto out;
204205
}
205206
}

0 commit comments

Comments
 (0)