[gimp/soc-2011-seamless-clone2] plug-ins: fix memory leak in file-html-table



commit 0ec239346ca6238ad472aa49750ecf79d47aa741
Author: Michael Henning <drawoc darkrefraction com>
Date:   Fri Jan 18 23:10:32 2013 -0500

    plug-ins: fix memory leak in file-html-table
    
    Found using clang's scan-build.

 plug-ins/common/file-html-table.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-html-table.c b/plug-ins/common/file-html-table.c
index b0da3f4..3c9d852 100644
--- a/plug-ins/common/file-html-table.c
+++ b/plug-ins/common/file-html-table.c
@@ -263,8 +263,8 @@ save_image (const gchar  *filename,
   gimp_progress_init_printf (_("Saving '%s'"),
                              gimp_filename_to_utf8 (filename));
 
-  buf  = g_new (guchar, babl_format_get_bytes_per_pixel (format));
-  buf2 = g_new (guchar, babl_format_get_bytes_per_pixel (format));
+  buf  = g_newa (guchar, babl_format_get_bytes_per_pixel (format));
+  buf2 = g_newa (guchar, babl_format_get_bytes_per_pixel (format));
 
   width = height = NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]