diff options
author | Paul Smith <psmith@gnu.org> | 1999-07-20 22:34:41 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-07-20 22:34:41 +0000 |
commit | 73846549f62b832ca6ff761ad3640a86d3b32c86 (patch) | |
tree | 040672d69082d86fe744ca7157bee5b72147f511 /read.c | |
parent | 169e6b8c3de0145c61ff2127b7c191d12f069d2b (diff) | |
download | gunmake-73846549f62b832ca6ff761ad3640a86d3b32c86.tar.gz |
* Fix memory leaks, fd leaks, and some long-standing bugs recognizing when
targets need to have their modtimes rechecked (-n, etc.)
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -280,7 +280,7 @@ read_makefile (filename, flags) register FILE *infile; struct linebuffer lb; unsigned int commands_len = 200; - char *commands = (char *) xmalloc (200); + char *commands; unsigned int commands_idx = 0; unsigned int cmds_started; char *p; @@ -396,7 +396,6 @@ read_makefile (filename, flags) attempt, rather from FILENAME itself. Restore it in case the caller wants to use it in a message. */ errno = makefile_errno; - free (commands); return 0; } @@ -408,6 +407,7 @@ read_makefile (filename, flags) when the start of the next rule (or eof) is encountered. */ initbuffer (&lb); + commands = xmalloc (200); while (!feof (infile)) { |