[dia] Bug #594877 - Memory leak when writing vdx



commit 72a406b9926e1cd0fb7e120d27ea322a3364936f
Author: Hans Breuer <hans breuer org>
Date:   Sat Sep 19 18:39:59 2009 +0200

    Bug #594877 - Memory leak when writing vdx

 plug-ins/vdx/vdx-xml.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/vdx/vdx-xml.c b/plug-ins/vdx/vdx-xml.c
index 04f8aeb..1fdac65 100644
--- a/plug-ins/vdx/vdx-xml.c
+++ b/plug-ins/vdx/vdx-xml.c
@@ -3439,7 +3439,7 @@ vdx_write_object(FILE *file, unsigned int depth, const void *p)
     const struct vdx_pp *pp;
     const struct vdx_tp *tp;
     const struct vdx_text *text;
-    char *pad = (char *)malloc(2*depth+1);
+    char *pad = (char *)g_alloca(2*depth+1);
     unsigned int i;
     for (i=0; i<2*depth; i++) { pad[i] = ' '; }
     pad[2*depth] = 0;



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