Fix windres memory leak

* windres.c (open_file_search): Free path buffer on failure.
This commit is contained in:
Chen Gang 2014-12-09 17:30:40 +10:30 committed by Alan Modra
parent 77ab336ea1
commit 137d1369ac
2 changed files with 5 additions and 0 deletions

View File

@ -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> 2014-12-08 Nick Clifton <nickc@redhat.com>
PR binutils/17531 PR binutils/17531

View File

@ -204,6 +204,7 @@ open_file_search (const char *filename, const char *mode, const char *errmsg,
*real_filename = n; *real_filename = n;
return e; return e;
} }
free (n);
if (errno != ENOENT) if (errno != ENOENT)
break; break;