]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld compact eh-frame leak
authorAlan Modra <amodra@gmail.com>
Wed, 22 Jan 2025 23:53:48 +0000 (10:23 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 23 Jan 2025 05:08:50 +0000 (15:38 +1030)
commitee8f3b6c78e1df055184635aedfe0ac1333a6706
treeeefbc15229184f6723e9f0ba60b126d0b139e3a2
parent90bea4932e94d1c6ca4930fc4e73684d270f660a
ld compact eh-frame leak

u.compact.extries wasn't being freed anywhere.  Free it when
destroying the linker hash table.  Also free u.dwarf.aray there in
case errors result in the linker not getting to the slightly earlier
free in write_dwarf_eh_frame_hdr.

* elf-eh-frame.c (write_dwarf_eh_frame_hdr): Don't exit without
freeing u.dwarf.array.
* elflink.c (_bfd_elf_link_hash_table_free): Free u.compact.entries
and u.dwarf.array.
bfd/elf-eh-frame.c
bfd/elflink.c