summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2018-10-04 18:58:04 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2018-10-04 18:58:04 +0900
commit038346dce0177d474a902602b553b0306bd668d5 (patch)
tree6e005f1ce2b5de18b168c134830cf6676b65a307 /src/lib/eina
parent75296e32df14610ec5d49316cee1966eb99f5cb2 (diff)
eina debug: fix a double unlock issue
Summary: It was caught by Covertity. This patch will remove a potential double unlock issue. @fix Test Plan: N/A Reviewers: zmike, raster, cedric, Hermet, eagleeye Reviewed By: eagleeye Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7137
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_debug_cpu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/eina/eina_debug_cpu.c b/src/lib/eina/eina_debug_cpu.c
index b4c3cf49c4..931139f5c0 100644
--- a/src/lib/eina/eina_debug_cpu.c
+++ b/src/lib/eina/eina_debug_cpu.c
@@ -281,11 +281,14 @@ _stop_cpu_thread(void)
281 { 281 {
282 usleep(1000); 282 usleep(1000);
283 eina_lock_take(&_sysmon_lock); 283 eina_lock_take(&_sysmon_lock);
284 if (_eina_debug_cpu_active == -1) break; 284 if (_eina_debug_cpu_active == -1)
285 {
286 _eina_debug_cpu_active = 0;
287 eina_lock_release(&_sysmon_lock);
288 break;
289 }
285 eina_lock_release(&_sysmon_lock); 290 eina_lock_release(&_sysmon_lock);
286 } 291 }
287 _eina_debug_cpu_active = 0;
288 eina_lock_release(&_sysmon_lock);
289} 292}
290 293
291static Eina_Bool 294static Eina_Bool