Use htab_create_alloc with calloc, not htab_alloc.
This commit is contained in:
parent
b09b19f786
commit
ebe3e2d199
@ -1,3 +1,9 @@
|
||||
2002-06-10 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* merge.c (merge_strings): Use htab_create_alloc with calloc, not
|
||||
htab_alloc.
|
||||
* elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
|
||||
|
||||
2002-06-08 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
|
||||
|
@ -352,7 +352,7 @@ _bfd_elf_strtab_finalize (tab)
|
||||
|
||||
qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
|
||||
|
||||
last4tab = htab_create (size * 4, NULL, last4_eq, NULL);
|
||||
last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free);
|
||||
if (last4tab == NULL)
|
||||
goto alloc_failure;
|
||||
|
||||
|
@ -652,8 +652,10 @@ merge_strings (sinfo)
|
||||
qsort (array, (size_t) sinfo->htab->size,
|
||||
sizeof (struct sec_merge_hash_entry *), cmplengthentry);
|
||||
|
||||
last4tab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last4_eq, NULL);
|
||||
lasttab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last_eq, NULL);
|
||||
last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
|
||||
NULL, last4_eq, NULL, calloc, free);
|
||||
lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
|
||||
NULL, last_eq, NULL, calloc, free);
|
||||
if (lasttab == NULL || last4tab == NULL)
|
||||
goto alloc_failure;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user