Skip to content

Commit b7ea2ac

Browse files
committed
module_adapter: Fix use after free in module_adapter_new_ext
Fix use after free in module_adapter_new_ext() by removing the dst access after freeing mod. The dst points to a field inside the previously allocated mod structure. The structure is freed on error so its fields do not need to be cleared beforehand. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent a33aaa8 commit b7ea2ac

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/audio/module_adapter/module_adapter.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,6 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
335335
schedule_task_free(dev->task);
336336
#endif
337337
module_adapter_mem_free(mod);
338-
#if CONFIG_IPC_MAJOR_4
339-
dst->ext_data = NULL;
340-
#endif
341-
342338
return NULL;
343339
}
344340

0 commit comments

Comments
 (0)