[PATCH 21.5] Plug ellcc memory leak

Jerry James james at xemacs.org
Tue May 22 12:30:42 EDT 2007


PATCH 21.5

This patch does not apply to 21.4.  There is a small memory leak in
ellcc.  It is not critical, but ought to be fixed nonetheless.


lib-src/ChangeLog addition:

2007-05-22  Jerry James  <james at xemacs.org>

	* ellcc.c (do_init_mode): Plug memory leak.


xemacs-21.5 source patch:
Diff command:   cvs -q diff -uN
Files affected: lib-src/ellcc.c

Index: lib-src/ellcc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/ellcc.c,v
retrieving revision 1.8
diff -d -u -r1.8 ellcc.c
--- lib-src/ellcc.c	2003/10/14 05:02:57	1.8
+++ lib-src/ellcc.c	2007/05/22 16:28:08
@@ -719,8 +719,13 @@
     {
       mdocprog = xnew (14 + strlen (ELLCC_ARCHDIR), char);
       sprintf (mdocprog, "%s/make-docfile", ELLCC_ARCHDIR);
+      exec_argv = add_to_argv (exec_argv, mdocprog);
+      free (mdocprog);
     }
-  exec_argv = add_to_argv (exec_argv, mdocprog);
+  else
+    {
+      exec_argv = add_to_argv (exec_argv, mdocprog);
+    }
   ts = xnew (4 + strlen (mod_output), char);
   sprintf (ts, "-E %s", mod_output);
   exec_argv = add_to_argv (exec_argv, ts);

-- 
Jerry James, Assistant Professor        james at xemacs.org
Computer Science Department             http://www.cs.usu.edu/~jerry/
Utah State University



More information about the XEmacs-Patches mailing list