]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Free symtab_hdr.contents and a cache_size correction
authorAlan Modra <amodra@gmail.com>
Sat, 11 Jan 2025 05:26:45 +0000 (15:56 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 15 Jan 2025 12:07:16 +0000 (22:37 +1030)
commit049467c758efe4460220f045205dc61fb69ef5ef
tree666360293b493eac85b6f262618fa88527067dc5
parent8c0361c7bb74911244364c7ee13db97275ea1c8d
Free symtab_hdr.contents and a cache_size correction

symtab_hdr.contents looks to be malloc'd memory, except in one case.
Change that one case to also be malloc'd and free when we are done.

* elf.c (swap_out_syms): bfd_malloc outbound_syms.
(_bfd_elf_free_cached_info): Free symtab_hdr.contents.
* elflink.c (init_reloc_cookie): Correct cache_size.  locsyms
is an array of Elf_Internal_Sym.
bfd/elf.c
bfd/elflink.c