Fix app manager/framework issues reported by Coverity (#1155)
runtime_sensor.c: add return value check for os_mutex_init
fix find_sensor_client
sensor_mgr_ref.c: add return value check for init_sensor_framework
app_manager_host.c: add return value check for app_manager_host_init
module_wasm_app.c: add bh_assert for m_data
fix mkdir potential issue
sample littlevgl/gui/simple: add return value check for init_sensor_framework
host_tool: add more check for g_conn_fd
This commit is contained in:
@ -264,15 +264,21 @@ aee_host_msg_callback(void *msg, uint32_t msg_len)
|
||||
bool
|
||||
app_manager_host_init(host_interface *interface)
|
||||
{
|
||||
os_mutex_init(&host_lock);
|
||||
if (os_mutex_init(&host_lock) != 0) {
|
||||
return false;
|
||||
}
|
||||
memset(&recv_ctx, 0, sizeof(recv_ctx));
|
||||
|
||||
host_commu.init = interface->init;
|
||||
host_commu.send = interface->send;
|
||||
host_commu.destroy = interface->destroy;
|
||||
|
||||
if (host_commu.init != NULL)
|
||||
return host_commu.init();
|
||||
if (host_commu.init != NULL) {
|
||||
if (!host_commu.init()) {
|
||||
os_mutex_destroy(&host_lock);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user