diff options
author | Nick Clifton <nickc@redhat.com> | 2015-08-04 14:50:40 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-08-04 14:50:40 +0100 |
commit | 4e13f8fb05eb7ffd163d96e519cc011d8d21e3d7 (patch) | |
tree | ee05ada407be5e93ebec9769feca9b1b478fe89d /binutils | |
parent | 524b57e6b3a36e0ce6573bbc4dba9f0bd9c165b1 (diff) | |
download | binutils-gdb-4e13f8fb05eb7ffd163d96e519cc011d8d21e3d7.tar.gz |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ar.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index 94c79e21540..2765dcc5f79 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1041,6 +1041,7 @@ extract_file (bfd *abfd) { non_fatal (_("illegal pathname found in archive member: %s"), bfd_get_filename (abfd)); + free (cbuf); return; } |