From: Roland McGrath Date: Thu, 27 May 1993 21:34:50 +0000 (+0000) Subject: Formerly implicit.c.~12~ X-Git-Tag: 3.70.2~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54fb2729675fd6b10f357abcec89700908bdbd5c;p=thirdparty%2Fmake.git Formerly implicit.c.~12~ --- diff --git a/implicit.c b/implicit.c index 943ce20c..6defa7ab 100644 --- a/implicit.c +++ b/implicit.c @@ -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 {