diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2007-02-16 05:34:27 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-02-16 05:34:27 +0000 |
commit | 37b0d5d7c83d410f472427397e7c3c6071052937 (patch) | |
tree | 84c5af44c286c24c83cc38232ed88de847177721 /gdk-pixbuf | |
parent | a498525e1ac3bd380312ff0c9a81aac613cf8e1d (diff) | |
download | gdk-pixbuf-37b0d5d7c83d410f472427397e7c3c6071052937.tar.gz |
Plug a leak in an error path
svn path=/branches/gtk-2-10/; revision=17307
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 6 | ||||
-rw-r--r-- | gdk-pixbuf/io-png.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 5d03e5768..4ccc1b10b 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,9 @@ +2007-02-16 Matthias Clasen <mclasen@redhat.com> + + Merged from trunk: + + * io-png.c: Don't leak in the error path. (#405539, Daniel Atallah) + 2007-02-07 Chris Wilson <chris@chris-wilson.co.uk> * io-jpeg.c: (gdk_pixbuf__jpeg_image_load), diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index 15f5c53e1..61fdd755d 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -917,8 +917,10 @@ static gboolean real_save_png (GdkPixbuf *pixbuf, error, png_simple_error_callback, png_simple_warning_callback); - - g_return_val_if_fail (png_ptr != NULL, FALSE); + if (png_ptr == NULL) { + success = FALSE; + goto cleanup; + } info_ptr = png_create_info_struct (png_ptr); if (info_ptr == NULL) { |