[gtk+] Fix a memory leak in GtkAccelGroup



commit 7e6cd2b31c08a2ab746beeacd86bb0435f1d7342
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 7 19:09:28 2009 -0400

    Fix a memory leak in GtkAccelGroup
    
    Unref closures in accel group finalization (#577824).
---
 gtk/gtkaccelgroup.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 32c76db..b26fd63 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -165,6 +165,9 @@ gtk_accel_group_finalize (GObject *object)
 	  _gtk_accel_map_remove_group (accel_path, accel_group);
 	}
       g_closure_remove_invalidate_notifier (entry->closure, accel_group, accel_closure_invalidate);
+
+      /* remove quick_accel_add() refcount */
+      g_closure_unref (entry->closure);
     }
 
   g_free (accel_group->priv_accels);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]