diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-30 11:48:20 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-30 13:29:24 +1030 |
commit | 6a89db5c9513d5e00e02b01095bf0c18e496dcc8 (patch) | |
tree | 31cd8716958eb7acd9d9f07b43e0fb31f4ef0929 /zlib/inftrees.c | |
parent | 61b3df8f5b7c75e51a4fe45bc7e479b4b482a1cd (diff) | |
download | gdb-6a89db5c9513d5e00e02b01095bf0c18e496dcc8.zip gdb-6a89db5c9513d5e00e02b01095bf0c18e496dcc8.tar.gz gdb-6a89db5c9513d5e00e02b01095bf0c18e496dcc8.tar.bz2 |
archive.c bfd_zalloc
Quite a few bfd_zalloc calls are wasting time clearing memory, and
should be bfd_alloc instead.
* archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than
bfd_zalloc when memory is all written after the call.
(do_slurp_coff_armap): Likewise. Set bfd_error on ridiculously
large allocations that overflow bfd_size_type. Use just one
bfd_release on error exit.
(_bfd_slurp_extended_name_table): Use bfd_alloc for extended_names,
clear last byte rather than the entire array. Use bfd_alloc for
string table. Rearrange and simplify code copying file names.
Diffstat (limited to 'zlib/inftrees.c')
0 files changed, 0 insertions, 0 deletions