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)
This commit is contained in:
Matthias Clasen 2004-01-14 20:10:27 +00:00 committed by Matthias Clasen
parent f759192184
commit 6aa252e720
6 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,8 @@
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)
Wed Jan 14 13:07:30 GMT 2004 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Updates to Section 5

View File

@ -1,3 +1,8 @@
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)
Wed Jan 14 13:07:30 GMT 2004 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Updates to Section 5

View File

@ -1,3 +1,8 @@
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)
Wed Jan 14 13:07:30 GMT 2004 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Updates to Section 5

View File

@ -1,3 +1,8 @@
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)
Wed Jan 14 13:07:30 GMT 2004 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Updates to Section 5

View File

@ -1,3 +1,8 @@
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)
Wed Jan 14 13:07:30 GMT 2004 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: Updates to Section 5

View File

@ -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);
}
/**