diff options
author | Soeren Sandmann <sandmann@daimi.au.dk> | 2003-07-13 19:29:54 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2003-07-13 19:29:54 +0000 |
commit | c6ce9c1564ab0576754803eba9f0a81499756ebb (patch) | |
tree | f909542fb0a7cefcb51b11824c0ed9b6be213b5d /gtk/gtktoolbutton.c | |
parent | 1a5a17d6293a7a2e1cd4b2fd985857f415b12980 (diff) | |
download | gtk+-c6ce9c1564ab0576754803eba9f0a81499756ebb.tar.gz |
Fix leaks of label_text, label_widget and icon_widget. (#117312, Christian
Sun Jul 13 15:57:57 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbutton.c (gtk_tool_button_finalize): Fix leaks of
label_text, label_widget and icon_widget. (#117312,
Christian Persch)
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r-- | gtk/gtktoolbutton.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 27b57e1671..23199edd87 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -501,9 +501,18 @@ gtk_tool_button_finalize (GObject *object) { GtkToolButton *button = GTK_TOOL_BUTTON (object); - g_free (button->priv->stock_id); - button->priv->stock_id = NULL; + if (button->priv->stock_id) + g_free (button->priv->stock_id); + if (button->priv->label_text) + g_free (button->priv->label_text); + + if (button->priv->label_widget) + g_object_unref (G_OBJECT (button->priv->label_widget)); + + if (button->priv->icon_widget) + g_object_unref (G_OBJECT (button->priv->icon_widget)); + parent_class->finalize (object); } |