diff options
author | Nick Clifton <nickc@redhat.com> | 2014-01-02 12:14:37 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-01-02 12:14:37 +0000 |
commit | 1be5090bcaf4bcab333cf03f4157b16d33881222 (patch) | |
tree | ceb44d7963da8d56f0a3253a0cba36c4830daead /bfd/mach-o.c | |
parent | e2359dfd4dd0f24cdb30886ed547c27a86813469 (diff) | |
download | gdb-1be5090bcaf4bcab333cf03f4157b16d33881222.zip gdb-1be5090bcaf4bcab333cf03f4157b16d33881222.tar.gz gdb-1be5090bcaf4bcab333cf03f4157b16d33881222.tar.bz2 |
PR binutils/11983
* archive.c (_bfd_get_elt_at_filepos): Store a copy of the
filename in the bfd's filename field.
* elfcode.h (bfd_from_remote_memory): Likewise.
* ieee.c (ieee_object_p): Likewise.
* mach-o.c (bfd_mach_o_fat_member_init): Likewise.
* oasys.c (oasys_openr_next_archived_file): Likewise.
* vms-lib.c (_bfd_vms_lib_get_module): Likewise.
* opncls.c (bfd_fopen): Likewise.
(bfd_openstreamr): Likewise.
(bfd_openr_iovec): Likewise.
(bfd_openw): Likewise.
(bfd_create): Likewise.
(_bfd_delete_bfd): Free filename.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r-- | bfd/mach-o.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index ffe7332..6640a6a 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -4353,13 +4353,13 @@ bfd_mach_o_fat_member_init (bfd *abfd, if (ap) { /* Use the architecture name if known. */ - abfd->filename = ap->printable_name; + abfd->filename = xstrdup (ap->printable_name); } else { /* Forge a uniq id. */ const size_t namelen = 2 + 8 + 1 + 2 + 8 + 1; - char *name = bfd_alloc (abfd, namelen); + char *name = xmalloc (namelen); snprintf (name, namelen, "0x%lx-0x%lx", entry->cputype, entry->cpusubtype); abfd->filename = name; |