file-jpeg: unref GeglBuffer in case of a problem (contd.)

The duplicate code in load_image() and load_thumbnail_image() should be
merged at some point into a single function.
This commit is contained in:
Mukund Sivaraman 2013-05-13 11:50:01 +05:30
parent b6a2d45821
commit 3cb0b2f35e
1 changed files with 4 additions and 1 deletions

View File

@ -671,7 +671,7 @@ load_thumbnail_image (const gchar *filename,
guchar **rowbuf;
GimpImageBaseType image_type;
GimpImageType layer_type;
GeglBuffer *buffer;
GeglBuffer *buffer = NULL;
gint tile_height;
gint scanlines;
gint i, start, end;
@ -712,6 +712,9 @@ load_thumbnail_image (const gchar *filename,
exif_data = NULL;
}
if (buffer)
g_object_unref (buffer);
return -1;
}