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:
@ -45,7 +45,7 @@ static char *uart_device = "/dev/ttyS2";
|
||||
static int baudrate = B115200;
|
||||
#endif
|
||||
|
||||
extern void
|
||||
extern bool
|
||||
init_sensor_framework();
|
||||
extern void
|
||||
exit_sensor_framework();
|
||||
@ -525,7 +525,9 @@ iwasm_main(int argc, char *argv[])
|
||||
|
||||
hal_init();
|
||||
|
||||
init_sensor_framework();
|
||||
if (!init_sensor_framework()) {
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
// timer manager
|
||||
init_wasm_timer();
|
||||
@ -545,6 +547,8 @@ iwasm_main(int argc, char *argv[])
|
||||
|
||||
exit_wasm_timer();
|
||||
exit_sensor_framework();
|
||||
|
||||
fail2:
|
||||
wgl_exit();
|
||||
exit_connection_framework();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user