]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR26388, objdump debug dump memory leaks
authorAlan Modra <amodra@gmail.com>
Fri, 14 Aug 2020 10:49:39 +0000 (20:19 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 14 Aug 2020 12:01:22 +0000 (21:31 +0930)
commit82fcdb39388c6690699d41b7022b054c2de2554c
tree6b1b98eb38205802317aa297108d6a6b25533cd4
parentfc0efc4bd704f09f59dd87e354c734f902017094
PR26388, objdump debug dump memory leaks

num_debug_info_entries is used not just as a count but also as a flag
(DEBUG_INFO_UNAVAILABLE) after some errors.  That means
num_debug_info_entries can't be used when cleaning up malloc'd info.

PR 26388
* dwarf.c (free_debug_memory): Free alloc_num_debug_info_entries
of debug_information.  Correct test of max_loc_offsets and
max_range_lists.
* rddbg.c (read_debugging_info): Free dhandle on error.
binutils/ChangeLog
binutils/dwarf.c
binutils/rddbg.c