[gtk+] Fixed minor memory leak on error
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Fixed minor memory leak on error
- Date: Wed, 8 Apr 2009 10:46:10 -0400 (EDT)
commit ea866c635b2c95067ef32b0b9a1aa90814f0b87c
Author: Dr. Michael J. Chudobiak <mjc xena (none)>
Date: Wed Apr 8 10:33:08 2009 -0400
Fixed minor memory leak on error
Bug 578290. Fixed a minor memory leak that occurs after a
memory allocation error. Found it using cppcheck.
---
gdk-pixbuf/io-jpeg.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index da59386..cf8c9ed 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -1184,6 +1184,7 @@ real_save_jpeg (GdkPixbuf *pixbuf,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
_("Couldn't allocate memory for loading JPEG file"));
+ g_free (buf);
return FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]