Fix memory leak in ar if it encounters an invalid path whilst extracting files.

* ar.c (extract_file): Free cbuf if the path is invalid.
This commit is contained in:
Nick Clifton 2015-08-04 14:50:40 +01:00
parent 524b57e6b3
commit 4e13f8fb05
1 changed files with 1 additions and 0 deletions

View File

@ -1041,6 +1041,7 @@ extract_file (bfd *abfd)
{
non_fatal (_("illegal pathname found in archive member: %s"),
bfd_get_filename (abfd));
free (cbuf);
return;
}