This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR22212, memory leak in nm
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 9 Oct 2017 15:19:58 +1030
- Subject: PR22212, memory leak in nm
- Authentication-results: sourceware.org; auth=none
PR 22212
* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
funcinfo_hash_table and varinfo_hash_table.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 248e621..ef380dd6 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)
--
Alan Modra
Australia Development Lab, IBM