Don't leak the format names. (#307190, Morten Welinder)

2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkselection.c (gtk_target_list_add_image_targets):
	Don't leak the format names.  (#307190, Morten Welinder)
This commit is contained in:
Matthias Clasen 2005-06-12 21:01:21 +00:00 committed by Matthias Clasen
parent 5ee5b7c4b5
commit 8cdee385b9
4 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-06-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Don't leak the format names. (#307190, Morten Welinder)
2005-06-12 Kjartan Maraas <kmaraas@gnome.org>
* gdk/x11/gdkasync.c: (send_event_handler): Plug

View File

@ -1,3 +1,8 @@
2005-06-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Don't leak the format names. (#307190, Morten Welinder)
2005-06-12 Kjartan Maraas <kmaraas@gnome.org>
* gdk/x11/gdkasync.c: (send_event_handler): Plug

View File

@ -1,3 +1,8 @@
2005-06-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Don't leak the format names. (#307190, Morten Welinder)
2005-06-12 Kjartan Maraas <kmaraas@gnome.org>
* gdk/x11/gdkasync.c: (send_event_handler): Plug

View File

@ -366,15 +366,20 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
for (f = formats; f; f = f->next)
{
GdkPixbufFormat *fmt = f->data;
if (strcmp (gdk_pixbuf_format_get_name (fmt), "png") == 0)
gchar *name;
name = gdk_pixbuf_format_get_name (fmt);
if (strcmp (name, "png") == 0)
{
formats = g_slist_delete_link (formats, f);
formats = g_slist_prepend (formats, fmt);
g_free (name);
break;
}
g_free (name);
}
for (f = formats; f; f = f->next)