summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-02-20 02:14:00 +0000
committerPaul Smith <psmith@gnu.org>2006-02-20 02:14:00 +0000
commit972d02d1d8dcbe0306a875a2c9c337f442f09170 (patch)
treec9e4c448ae4476e5ef81ca5a5ca8feb344e519c7 /implicit.c
parent6718750008ff7a4b2e1cec66b926dab0ed033ab7 (diff)
downloadmake-972d02d1d8dcbe0306a875a2c9c337f442f09170.tar.gz
- Memory cleanups, found with valgrind.
- Fix handling of special targets like .SUFFIX for VMS insensitive targets. - Don't make temporary batch files for -n. Make sure batch files are created in text mode.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/implicit.c b/implicit.c
index d7c140a4..054b71a5 100644
--- a/implicit.c
+++ b/implicit.c
@@ -90,14 +90,9 @@ free_idep_chain (struct idep *p)
free (p->name);
f = p->intermediate_file;
- if (f != 0)
- {
- /* if (f->variables)
- free_variable_set (f->variables); */
- if (f->stem < f->name
- || f->stem > f->name + strlen (f->name))
- free (f->stem);
- }
+ if (f != 0
+ && (f->stem < f->name || f->stem > f->name + strlen (f->name)))
+ free (f->stem);
free (p);
}
@@ -841,7 +836,7 @@ pattern_search (struct file *file, int archive,
f->deps = imf->deps;
f->cmds = imf->cmds;
- f->stem = imf->stem;
+ f->stem = xstrdup (imf->stem);
f->also_make = imf->also_make;
f->is_target = 1;