[gtk+] Fixed minor memory leak on error



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]