Commit: Fix memory leak in ar
Nick Clifton
nickc@redhat.com
Tue Aug 4 13:50:00 GMT 2015
Hi Guys,
I am checking in the patch below to close a small memory leak in ar,
should it encounter an invalid patch whilst extracting files.
Cheers
Nick
binutils/ChangeLog
2015-08-04 Nick Clifton <nickc@redhat.com>
* ar.c (extract_file): Free cbuf if the path is invalid.
diff --git a/binutils/ar.c b/binutils/ar.c
index 94c79e2..2765dcc 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;
}
More information about the Binutils
mailing list