changeset 3983:854c88538753

[xemacs-hg @ 2007-05-24 20:18:50 by james] Plug a small memory leak in ellcc.c. See xemacs-patches message <m3ejl8stvx.fsf@jerrypc.cs.usu.edu>.
author james
date Thu, 24 May 2007 20:18:50 +0000
parents 37670fd0fa58
children 1392aae72ccb
files lib-src/ChangeLog lib-src/ellcc.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Wed May 23 21:52:00 2007 +0000
+++ b/lib-src/ChangeLog	Thu May 24 20:18:50 2007 +0000
@@ -1,3 +1,7 @@
+2007-05-22  Jerry James  <james@xemacs.org>
+
+	* ellcc.c (do_init_mode): Plug memory leak.
+
 2007-05-21  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* XEmacs 21.5.28 "fuki" is released.
--- a/lib-src/ellcc.c	Wed May 23 21:52:00 2007 +0000
+++ b/lib-src/ellcc.c	Thu May 24 20:18:50 2007 +0000
@@ -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);