PR22212, memory leak in nm

PR 22212
	* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
	funcinfo_hash_table and varinfo_hash_table.
This commit is contained in:
Alan Modra 2017-10-09 13:21:44 +10:30
parent a72f95f776
commit b55ec8b676
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2017-10-09 Alan Modra <amodra@gmail.com>
PR 22212
* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
funcinfo_hash_table and varinfo_hash_table.
2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
* elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation

View file

@ -4927,6 +4927,10 @@ _bfd_dwarf2_cleanup_debug_info (bfd *abfd, void **pinfo)
}
}
if (stash->funcinfo_hash_table)
bfd_hash_table_free (&stash->funcinfo_hash_table->base);
if (stash->varinfo_hash_table)
bfd_hash_table_free (&stash->varinfo_hash_table->base);
if (stash->dwarf_abbrev_buffer)
free (stash->dwarf_abbrev_buffer);
if (stash->dwarf_line_buffer)