Skip to content

Commit db5625c

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 4870dfc commit db5625c

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/audio/module_adapter/module_adapter.c

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

0 commit comments

Comments
 (0)