make-w32
[Top][All Lists]
Advanced

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

Memory leak fix


From: J. Grant
Subject: Memory leak fix
Date: Mon, 08 Mar 2004 00:10:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030824

Hello

Please consider the attatched patch for addition.

2004-02-23  Jonathan R. Grant  <address@hidden>

        * main.c: Free the makefile_mtimes to stop memory leak, minumum leak
        size was 12bytes on Windows32 build. (makefile_mtimes defined line 
1661).
        
        * main.c:1062 fix "iff" typo.


Tests all ran successfully on i686-pc-linux-gnu.


Regards

JG
Index: main.c
===================================================================
RCS file: /cvsroot/make/make/main.c,v
retrieving revision 1.186
diff -u -r1.186 main.c
--- main.c      24 Feb 2004 13:50:21 -0000      1.186
+++ main.c      8 Mar 2004 00:00:44 -0000
@@ -1059,7 +1059,7 @@
       define_variable("Path", 4, "", o_env, 1)->export = v_export;
 
     /*
-     * PATH defaults to Path iff PATH not found and Path is found.
+     * PATH defaults to Path if PATH not found and Path is found.
      */
     if (!unix_path && windows32_path)
       define_variable("PATH", 4, windows32_path, o_env, 1)->export = v_export;
@@ -1938,6 +1938,11 @@
        }
 
       db_level = orig_db_level;
+      
+      /* Free the makefile modified times table  */
+      free(makefile_mtimes);
+      makefile_mtimes = NULL;
+
     }
 
   /* Set up `MAKEFLAGS' again for the normal targets.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]