summaryrefslogtreecommitdiff
path: root/gtk/gtkactiongroup.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-01-14 20:10:27 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-01-14 20:10:27 +0000
commit6aa252e720a31303c00329192e4c49a7524061fe (patch)
tree47b824244f7969c32e789a3c49fcef3b2d641535 /gtk/gtkactiongroup.c
parentf7591921846885f0509e33946083e1d2d51b2bf0 (diff)
downloadgtk+-6aa252e720a31303c00329192e4c49a7524061fe.tar.gz
Don't leak name and stock_id. (#131358, Morten Welinder)
Wed Jan 14 21:00:49 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): Don't leak name and stock_id. (#131358, Morten Welinder)
Diffstat (limited to 'gtk/gtkactiongroup.c')
-rw-r--r--gtk/gtkactiongroup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkactiongroup.c b/gtk/gtkactiongroup.c
index 4c3ef728e1..8a3c2974db 100644
--- a/gtk/gtkactiongroup.c
+++ b/gtk/gtkactiongroup.c
@@ -562,8 +562,8 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
guint accel_key = 0;
GdkModifierType accel_mods;
GtkStockItem stock_item;
- const gchar *name;
- const gchar *stock_id;
+ gchar *name;
+ gchar *stock_id;
g_object_get (action, "name", &name, "stock_id", &stock_id, NULL);
@@ -582,9 +582,11 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
gtk_accel_map_add_entry (accel_path, accel_key, accel_mods);
gtk_action_set_accel_path (action, accel_path);
- g_free (accel_path);
-
gtk_action_group_add_action (action_group, action);
+
+ g_free (accel_path);
+ g_free (stock_id);
+ g_free (name);
}
/**