[gtk+] GtkColorButton: Don't leak references



commit e32728fb5cc26931088584b09b44dd407e961a22
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Apr 6 00:56:37 2011 -0400

    GtkColorButton: Don't leak references
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646815

 gtk/gtkcolorbutton.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 6084ee7..784abf3 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -664,6 +664,9 @@ gtk_color_button_clicked (GtkButton *button)
                         G_CALLBACK (dialog_cancel_clicked), color_button);
       g_signal_connect (color_dialog, "destroy",
                         G_CALLBACK (dialog_destroy), color_button);
+
+      g_object_unref (ok_button);
+      g_object_unref (cancel_button);
     }
 
   color_dialog = GTK_COLOR_SELECTION_DIALOG (color_button->priv->cs_dialog);



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