aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 5aae545..ef9469b 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -597,12 +597,12 @@ _bfd_generic_link_hash_table_create (abfd)
struct generic_link_hash_table *ret;
ret = ((struct generic_link_hash_table *)
- malloc (sizeof (struct generic_link_hash_table)));
- if (!ret)
- {
- bfd_set_error (bfd_error_no_memory);
- return (struct bfd_link_hash_table *) NULL;
- }
+ bfd_alloc (abfd, sizeof (struct generic_link_hash_table)));
+ if (ret == NULL)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return (struct bfd_link_hash_table *) NULL;
+ }
if (! _bfd_link_hash_table_init (&ret->root, abfd,
generic_link_hash_newfunc))
{