diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-05-18 21:42:09 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-05-18 21:42:09 +0000 |
commit | 7b6265b63ed56aabb619e17e37bd2936d4e4baf4 (patch) | |
tree | 3d153368c73358733a300615c041b4ac6adf4533 | |
parent | 5daf89e386622dc4d3697e1bc98faa4a19153c0d (diff) |
pixmap_save: fix a small memory leak.
svn path=/trunk/; revision=28400
-rw-r--r-- | gtk/pixmap_save.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gtk/pixmap_save.c b/gtk/pixmap_save.c index c33e34211e..4b661dfbf6 100644 --- a/gtk/pixmap_save.c +++ b/gtk/pixmap_save.c @@ -98,7 +98,7 @@ pixmap_save_cb(GtkWidget *w, gpointer pixmap_ptr _U_) GdkPixbuf *pixbuf; GdkPixbufFormat *pixbuf_format; GtkWidget *main_vb, *save_as_type_hb, *type_lb, *type_cm; - GSList *file_formats; + GSList *file_formats,*ffp; GdkWindow *parent; pixbuf = gdk_pixbuf_get_from_drawable(NULL, GDK_DRAWABLE(pixmap), NULL, @@ -139,17 +139,15 @@ pixmap_save_cb(GtkWidget *w, gpointer pixmap_ptr _U_) /* List all of the file formats the gdk-pixbuf library supports */ file_formats = gdk_pixbuf_get_formats(); - - while(file_formats) { - if (gdk_pixbuf_format_is_writable(file_formats->data)) { - pixbuf_format = file_formats->data; + ffp = file_formats; + while(ffp) { + if (gdk_pixbuf_format_is_writable(ffp->data)) { + pixbuf_format = ffp->data; gtk_combo_box_append_text(GTK_COMBO_BOX(type_cm), gdk_pixbuf_format_get_name(pixbuf_format)); } - - file_formats = file_formats->next; + ffp = g_slist_next(ffp); } - g_slist_free(file_formats); gtk_combo_box_set_active(GTK_COMBO_BOX(type_cm), 0); |