From: jphnix Date: Tue, 30 Jan 2024 10:33:55 +0000 (+0000) Subject: Add missing Lock X-Git-Tag: accepted/tizen/unified/20240219.160350~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af8dcff0a8cb47570383ef27f170280e98ac693a;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Add missing Lock - gthread->loop is held with thread_mutex. - But it doesn't hold thread_mutex in tpl_gthread_add_idle Change-Id: Ibaddbcf7e4d4b9ec661ee69c0a95dbc517970ea2 --- diff --git a/src/tpl_utils_gthread.c b/src/tpl_utils_gthread.c index 54cd2b6..466baef 100644 --- a/src/tpl_utils_gthread.c +++ b/src/tpl_utils_gthread.c @@ -627,7 +627,10 @@ tpl_gthread_add_idle(tpl_gthread *gthread, tpl_gsource_func idle_cb, void *data) g_source_set_callback(idle_source, idle_cb, (gpointer)data, NULL); + + g_mutex_lock(>hread->thread_mutex); g_source_attach(idle_source, g_main_loop_get_context(gthread->loop)); + g_mutex_unlock(>hread->thread_mutex); g_source_unref(idle_source); return TPL_ERROR_NONE;