From 6d763bd97ca043bdab1847a0c42fce81b3a9c49a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 7 Nov 2005 20:15:48 +0000 Subject: [PATCH] Don't call cb_funcs->unref while holding the context lock. (#320886, Andy 2005-11-07 Matthias Clasen * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref while holding the context lock. (#320886, Andy Wingo) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ glib/gmain.c | 6 +++--- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2e07041..6c86125d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e2e07041..6c86125d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e2e07041..6c86125d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2005-11-07 Matthias Clasen + + * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref + while holding the context lock. (#320886, Andy Wingo) + 2005-11-07 Billy Biggs * tests/refcount/Makefile.am: Add a missing reference to libglib diff --git a/glib/gmain.c b/glib/gmain.c index 5893544a..e3a47b79 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -1915,12 +1915,12 @@ g_main_dispatch (GMainContext *context) user_data); (*depth)--; - LOCK_CONTEXT (context); - if (cb_funcs) cb_funcs->unref (cb_data); - if (!was_in_call) + LOCK_CONTEXT (context); + + if (!was_in_call) source->flags &= ~G_HOOK_FLAG_IN_CALL; if ((source->flags & G_SOURCE_CAN_RECURSE) == 0 && -- 2.34.1