aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lto-plugin/ChangeLog4
-rw-r--r--lto-plugin/lto-plugin.c5
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')
{