+2012-08-16 Tom Tromey <tromey@redhat.com>
+
+ PR binutils/14475:
+ * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
+ 'member' BFD. Don't try to free 'ared'.
+
2012-08-14 Nick Clifton <nickc@redhat.com>
* po/uk.po: Updated Ukranian translation.
}
amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
- ared = (struct areltdata *) bfd_zalloc (abfd, amt);
+ ared = (struct areltdata *) bfd_zalloc (member, amt);
if (ared == NULL)
return NULL;
hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
_bfd_ar_spacepad (hdr->ar_mode, sizeof (hdr->ar_mode), "%-8lo",
status.st_mode);
if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), status.st_size))
- {
- free (ared);
- return NULL;
- }
+ return NULL;
memcpy (hdr->ar_fmag, ARFMAG, 2);
ared->parsed_size = status.st_size;
ared->arch_header = (char *) hdr;