Commit 8cdee385 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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)
parent 5ee5b7c4
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
......
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
......
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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment