aboutsummaryrefslogtreecommitdiff
path: root/bfd/mach-o.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r--bfd/mach-o.c4
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;