]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly implicit.c.~12~
authorRoland McGrath <roland@redhat.com>
Thu, 27 May 1993 21:34:50 +0000 (21:34 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 27 May 1993 21:34:50 +0000 (21:34 +0000)
implicit.c

index 943ce20c9b1eaba7cb8d6a3a36064a5f6ac153b1..6defa7ab6386a47cbca920924547b4cbc01e5c68 100644 (file)
@@ -513,7 +513,14 @@ pattern_search (file, archive, depth, recursions)
       if (recursions == 0)
        {
          dep->name = 0;
-         dep->file = enter_file (s);   
+         dep->file = lookup_file (s);
+         if (dep->file == 0)
+           /* enter_file consumes S's storage.  */
+           dep->file = enter_file (s);
+         else
+           /* A copy of S is already allocated in DEP->file->name.
+              So we can free S.  */
+           free (s);
        }
       else
        {