Skip to content

Commit 7600323

Browse files
committed
module_adapter: avoid module init crash in case of ipc data invalid
In ipc3 module creation, it is possible that ipc data is invalid or corrupted, in this case, module init may crash. This patch is adding error handling to avoid crash. Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
1 parent cff23f5 commit 7600323

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/audio/module_adapter/module_adapter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv,
130130
goto err;
131131
}
132132
dst->init_data = dst->data;
133+
} else {
134+
goto err;
133135
}
134136
#else
135137
if (drv->type == SOF_COMP_MODULE_ADAPTER) {

0 commit comments

Comments
 (0)