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
commit6e0527913c6724fa92e2135de991e27df54c4289 (patch)
treec9e4c448ae4476e5ef81ca5a5ca8feb344e519c7 /implicit.c
parentbde826b18aeb6fd3c9de7a7733d1e163efde90e1 (diff)
downloadgunmake-6e0527913c6724fa92e2135de991e27df54c4289.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 d7c140a..054b71a 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;