From: Chen Gang Date: Tue, 9 Dec 2014 07:00:40 +0000 (+1030) Subject: Fix windres memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=137d1369ac054744d27f19e95aa8a739e6c0068d;p=binutils-gdb.git Fix windres memory leak * windres.c (open_file_search): Free path buffer on failure. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a1ce578ccaf..7404a15df0f 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 7fa90fc7f78..14cf11e66b1 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;