summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-07-20 22:34:41 +0000
committerPaul Smith <psmith@gnu.org>1999-07-20 22:34:41 +0000
commit73846549f62b832ca6ff761ad3640a86d3b32c86 (patch)
tree040672d69082d86fe744ca7157bee5b72147f511 /read.c
parent169e6b8c3de0145c61ff2127b7c191d12f069d2b (diff)
downloadgunmake-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read.c b/read.c
index 0a39ef6..bfc247e 100644
--- a/read.c
+++ b/read.c
@@ -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))
{