From: Dongwoo Lee Date: Thu, 7 Mar 2024 09:03:57 +0000 (+0900) Subject: pass-rescon: Get scenario_level_list inside critical section X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fdwlee08%2Ffix_coverity;p=platform%2Fcore%2Fsystem%2Fpass.git pass-rescon: Get scenario_level_list inside critical section Change-Id: Ia371058c6ad4419da4ef48c569bdef6bf43fbe2a Signed-off-by: Dongwoo Lee --- diff --git a/src/pass/pass-rescon.c b/src/pass/pass-rescon.c index a90999d..a1e17d2 100644 --- a/src/pass/pass-rescon.c +++ b/src/pass/pass-rescon.c @@ -185,7 +185,7 @@ static int rescon_update(struct pass_resource *res) struct pass_level *levels = res->config_data.levels; struct pass_level *scenario_levels = res->config_data.scenario_levels; struct pass_level adjusted_level; - GList *list = rescon->scenario_level_list; + GList *list; int res_type = res->config_data.res_type; int limit_max_freq = -1; int limit_min_freq = -1; @@ -222,6 +222,7 @@ static int rescon_update(struct pass_resource *res) /* Adjust with scenario pass_level */ g_mutex_lock(&rescon->scenario_level_mutex); + list = rescon->scenario_level_list; while (list != NULL) { i = GPOINTER_TO_INT(list->data); list = g_list_next(list);