From 939b216956668489c979bdc55cfaadc25e28e025 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 Mar 1997 17:58:48 +0000 Subject: [PATCH] * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather than malloc. --- bfd/ChangeLog | 5 +++++ bfd/xcofflink.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7b71d229e9f..e482b1d786d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 18 12:58:08 1997 Ian Lance Taylor + + * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather + than malloc. + Mon Mar 17 11:32:53 1997 Ian Lance Taylor * bfd-in.h: Don't include obstack.h. diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 92c7056e847..0a5c5fc7b68 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -4185,12 +4185,9 @@ _bfd_xcoff_bfd_final_link (abfd, info) /* Now that we have written out all the global symbols, we know the symbol indices to use for relocs against them, and we can finally write out the relocs. */ - external_relocs = (bfd_byte *) malloc (max_output_reloc_count * relsz); + external_relocs = (bfd_byte *) bfd_malloc (max_output_reloc_count * relsz); if (external_relocs == NULL && max_output_reloc_count != 0) - { - bfd_set_error (bfd_error_no_memory); - goto error_return; - } + goto error_return; for (o = abfd->sections; o != NULL; o = o->next) { -- 2.30.2