diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2007-02-16 05:32:59 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-02-16 05:32:59 +0000 |
commit | 14dab9515df0114ea3f73c948c54fdb6fdf9a54e (patch) | |
tree | ffd26d1cf69c6e17dfc87f903d6b366d2bf139c0 | |
parent | e4b166722c72545a0537f7bd651a55e7947c6cf8 (diff) | |
download | gtk+-14dab9515df0114ea3f73c948c54fdb6fdf9a54e.tar.gz |
Fix a leak in an error path
svn path=/trunk/; revision=17306
-rw-r--r-- | gdk-pixbuf/ChangeLog | 4 | ||||
-rw-r--r-- | gdk-pixbuf/io-png.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 94415d916f..69dcadaa23 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,7 @@ +2007-02-16 Matthias Clasen <mclasen@redhat.com> + + * 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 2c98d63c4a..13a4c66e69 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) { |