aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/windres.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index a1ce578..7404a15 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-09 Chen Gang <gang.chen.5i5j@gmail.com>
+
+ * windres.c (open_file_search): Free path buffer on failure.
+
2014-12-08 Nick Clifton <nickc@redhat.com>
PR binutils/17531
diff --git a/binutils/windres.c b/binutils/windres.c
index 7fa90fc..14cf11e 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -204,6 +204,7 @@ open_file_search (const char *filename, const char *mode, const char *errmsg,
*real_filename = n;
return e;
}
+ free (n);
if (errno != ENOENT)
break;