Fix a leak in an error path

svn path=/trunk/; revision=17306
This commit is contained in:
Matthias Clasen 2007-02-16 05:32:59 +00:00
parent e4b166722c
commit 14dab9515d
2 changed files with 8 additions and 2 deletions

View File

@ -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),

View File

@ -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) {