mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
* aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
using bfd_alloc, not malloc. * cofflink.c (_bfd_coff_link_hash_table_create): Likewise. * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * i386linux.c (linux_link_hash_table_create): Likewise. * linker.c (_bfd_generic_link_hash_table_create): Likewise. * sunos.c (sunos_link_hash_table_create): Likewise.
This commit is contained in:
12
bfd/linker.c
12
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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user