summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-06-04 00:15:12 +0000
committerRoland McGrath <roland@redhat.com>1993-06-04 00:15:12 +0000
commit00dc97cb8a139927f6a086967f2a2f6cec639174 (patch)
tree4ffae2054ae284fadb0bbdb691fe7fd6a5e53e67 /implicit.c
parent9766fe17755279033ef1059aa9bcca6d4e27dbf8 (diff)
downloadgunmake-00dc97cb8a139927f6a086967f2a2f6cec639174.tar.gz
Formerly implicit.c.~13~
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/implicit.c b/implicit.c
index 6defa7a..bb4d63a 100644
--- a/implicit.c
+++ b/implicit.c
@@ -408,10 +408,13 @@ pattern_search (file, archive, depth, recursions)
p = savestring (p, strlen (p));
intermediate_patterns[deps_found]
= intermediate_file->name;
- found_files[deps_found] = p;
intermediate_file->name = p;
intermediate_files[deps_found] = intermediate_file;
intermediate_file = 0;
+ /* Allocate an extra copy to go in FOUND_FILES,
+ because every elt of FOUND_FILES is consumed
+ or freed later. */
+ found_files[deps_found] = savestring (p, strlen (p));
++deps_found;
continue;
}