From 137d1369ac054744d27f19e95aa8a739e6c0068d Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 9 Dec 2014 17:30:40 +1030 Subject: [PATCH] Fix windres memory leak * windres.c (open_file_search): Free path buffer on failure. --- binutils/ChangeLog | 4 ++++ binutils/windres.c | 1 + 2 files changed, 5 insertions(+) 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 + + * windres.c (open_file_search): Free path buffer on failure. + 2014-12-08 Nick Clifton 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; -- 2.7.4