res->config_data.default_max_level = rescon->max_level;
/* Initialize g_list of scenario_level */
- rescon->scenario_level_list = NULL;
g_mutex_init(&rescon->scenario_level_mutex);
+ g_mutex_lock(&rescon->scenario_level_mutex);
+ rescon->scenario_level_list = NULL;
+ g_mutex_unlock(&rescon->scenario_level_mutex);
+
/*
* Save the current data of h/w resource. The saved data
* will be used for restoring the h/w resource on exit().
rescon->init_level = 0;
/* Free g_list of scenario_level */
+ g_mutex_lock(&rescon->scenario_level_mutex);
g_list_free(rescon->scenario_level_list);
rescon->scenario_level_list = NULL;
+ g_mutex_unlock(&rescon->scenario_level_mutex);
+
g_mutex_clear(&rescon->scenario_level_mutex);
rescon->state = PASS_OFF;