From: Kai Tietz Date: Sat, 13 Nov 2010 18:49:07 +0000 (+0000) Subject: lto-plugin.c (add_output_files): Fix memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44538c626c072106122ae7b7f81a3775806c6df5;p=gcc.git lto-plugin.c (add_output_files): Fix memory leak. 2010-11-13 Kai Tietz * lto-plugin.c (add_output_files): Fix memory leak. From-SVN: r166718 --- 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') {