diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2010-11-13 18:49:07 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2010-11-13 19:49:07 +0100 |
commit | 44538c626c072106122ae7b7f81a3775806c6df5 (patch) | |
tree | 8d326af60f8ac3e9bc3bf53afe4ac560e49178b2 | |
parent | 82220036f6aff4fce8fc563a13bc591b0b10bfd9 (diff) | |
download | gcc-44538c626c072106122ae7b7f81a3775806c6df5.zip gcc-44538c626c072106122ae7b7f81a3775806c6df5.tar.gz gcc-44538c626c072106122ae7b7f81a3775806c6df5.tar.bz2 |
lto-plugin.c (add_output_files): Fix memory leak.
2010-11-13 Kai Tietz <kai.tietz@onevision.com>
* lto-plugin.c (add_output_files): Fix memory leak.
From-SVN: r166718
-rw-r--r-- | lto-plugin/ChangeLog | 4 | ||||
-rw-r--r-- | lto-plugin/lto-plugin.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 3db5448..95b6f5e 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,7 @@ +2010-11-13 Kai Tietz <kai.tietz@onevision.com> + + * lto-plugin.c (add_output_files): Fix memory leak. + 2010-11-11 Dave Korn <dave.korn.cygwin@gmail.com> PR bootstrap/46397 diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 78eb109..d283028 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') { |