[gimp] file-jpeg: unref GeglBuffer in case of a problem (contd.)
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] file-jpeg: unref GeglBuffer in case of a problem (contd.)
- Date: Mon, 13 May 2013 06:21:02 +0000 (UTC)
commit 3cb0b2f35ee7355ae291637daf26bbed2e18a56a
Author: Mukund Sivaraman <muks banu com>
Date: Mon May 13 11:50:01 2013 +0530
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.
plug-ins/file-jpeg/jpeg-load.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c
index 8ce8119..873e3a4 100644
--- a/plug-ins/file-jpeg/jpeg-load.c
+++ b/plug-ins/file-jpeg/jpeg-load.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]