PR29362, some binutils memory leaks
authorAlan Modra <amodra@gmail.com>
Mon, 15 Aug 2022 14:46:49 +0000 (00:16 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 15 Aug 2022 14:55:10 +0000 (00:25 +0930)
commit450da4bd38ae529a6879baafe59b1e88507b5fd9
tree7f7794e1b3bff3b9466a127cc10e296b6c9eeec3
parent105afa7f230e5fed8f5a2eb28bc14d7696f5ac72
PR29362, some binutils memory leaks

2022-08-16  Alan Modra  <amodra@gmail.com>
    Cunlong Li  <shenxiaogll@163.com>

PR 29362
* dwarf.c (free_debug_information): New function, extracted..
(free_debug_memory): ..from here.
(process_debug_info): Use it when before clearing out unit
debug_information.  Clear all fields.
* objcopy.c (delete_symbol_htabs): New function.
(main): Call it via xatexit.
(copy_archive): Free "dir".
* objdump.c (free_debug_section): Free reloc_info.
binutils/dwarf.c
binutils/objcopy.c
binutils/objdump.c