PR binutils/11983
[deliverable/binutils-gdb.git] / bfd / mach-o.c
index ffe7332a674063310989412fdd5e08aabc7cfce8..6640a6a658f8c44e3bfca319acc03d1aac7a9178 100644 (file)
@@ -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;
This page took 0.02628 seconds and 4 git commands to generate.