diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 3db5448ba25..95b6f5efbe9 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,7 @@ +2010-11-13 Kai Tietz + + * lto-plugin.c (add_output_files): Fix memory leak. + 2010-11-11 Dave Korn PR bootstrap/46397 diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 78eb1098837..d2830283f6f 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -461,7 +461,10 @@ add_output_files (FILE *f) buf = s; cont: if (!fgets (buf, piece, f)) - break; + { + free (s); + break; + } len = strlen (s); if (s[len - 1] != '\n') {