summaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-10-09 13:21:44 +1030
committerAlan Modra <amodra@gmail.com>2017-10-09 13:23:00 +1030
commitb55ec8b676ed05d93ee49d6c79ae0403616c4fb0 (patch)
tree5ccca714ff3f7f257f9e9db29de21d6ab29d571e /bfd/dwarf2.c
parenta72f95f7760bf85693af393c5e01dd3aedbe5bde (diff)
downloadbinutils-gdb-b55ec8b676ed05d93ee49d6c79ae0403616c4fb0.tar.gz
PR22212, memory leak in nm
PR 22212 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free funcinfo_hash_table and varinfo_hash_table.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 248e621ad33..ef380dd6823 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -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)