summaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 8ecd7f26dfc..e719cd3a2e3 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -616,14 +616,7 @@ bfd_get_archive_filename (const bfd *abfd)
if (curr)
free (buf);
curr = needed + (needed >> 1);
- buf = (char *) bfd_malloc (curr);
- /* If we can't malloc, fail safe by returning just the file name.
- This function is only used when building error messages. */
- if (!buf)
- {
- curr = 0;
- return bfd_get_filename (abfd);
- }
+ buf = (char *) xmalloc (curr);
}
sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
bfd_get_filename (abfd));