mirror of https://github.com/thesofproject/sof.git
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>
This commit is contained in:
parent
f222070b6c
commit
e847c8b270
|
@ -130,6 +130,8 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv,
|
|||
goto err;
|
||||
}
|
||||
dst->init_data = dst->data;
|
||||
} else {
|
||||
goto err;
|
||||
}
|
||||
#else
|
||||
if (drv->type == SOF_COMP_MODULE_ADAPTER) {
|
||||
|
|
Loading…
Reference in New Issue