Don't call cb_funcs->unref while holding the context lock. (#320886, Andy
authorMatthias Clasen <mclasen@redhat.com>
Mon, 7 Nov 2005 20:15:48 +0000 (20:15 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 7 Nov 2005 20:15:48 +0000 (20:15 +0000)
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

* glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
while holding the context lock.  (#320886, Andy Wingo)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
glib/gmain.c

index e2e0704131fb313c4afc35c7a3f7e67e42a33145..6c86125d1e1773038b05d2495ace287bd7f10aaa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index e2e0704131fb313c4afc35c7a3f7e67e42a33145..6c86125d1e1773038b05d2495ace287bd7f10aaa 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index e2e0704131fb313c4afc35c7a3f7e67e42a33145..6c86125d1e1773038b05d2495ace287bd7f10aaa 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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 <vektor@dumbterm.net>
 
        * tests/refcount/Makefile.am: Add a missing reference to libglib
index 5893544a38ed22128c7071c1c4eb7d2e524d64c4..e3a47b790afc13ff46069baa9f4e5f9782e97164 100644 (file)
@@ -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 &&