]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly implicit.c.~13~
authorRoland McGrath <roland@redhat.com>
Fri, 4 Jun 1993 00:15:12 +0000 (00:15 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 4 Jun 1993 00:15:12 +0000 (00:15 +0000)
implicit.c

index 6defa7ab6386a47cbca920924547b4cbc01e5c68..bb4d63a43a9c283a7131b717a4ed6946635c8384 100644 (file)
@@ -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;
                    }