file-jpeg: unref GeglBuffer in case of a problem

This commit is contained in:
Mukund Sivaraman 2013-05-13 11:46:52 +05:30
parent 51680fb987
commit b6a2d45821
1 changed files with 4 additions and 1 deletions

View File

@ -85,7 +85,7 @@ load_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;
@ -137,6 +137,9 @@ load_image (const gchar *filename,
if (preview)
destroy_preview ();
if (buffer)
g_object_unref (buffer);
return -1;
}