Fix a memory leak and remove an unused member
authorTom Tromey <tom@tromey.com>
Mon, 24 Feb 2020 22:50:57 +0000 (15:50 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 24 Feb 2020 22:50:58 +0000 (15:50 -0700)
commit4ac9383206032dd0357602136af1e05e7701142b
tree1c681b7b640328c94f9baf2cc5bdf39552860f16
parent197400e8009fa9a15ddc59cbf2cc32b0debd3424
Fix a memory leak and remove an unused member

I noticed that setup_type_unit_groups leaks the symtab vector -- it
allocates this with XNEWVEC, but from what I can tell, nothing frees
it.  This patch changes it to use XOBNEWVEC.

Also, the type_unit_unshareable::num_symtabs member is assigned but
never read.  So, this removes it.

gdb/ChangeLog
2020-02-24  Tom Tromey  <tom@tromey.com>

* dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
Remove.
* dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
XOBNEWVEC.
gdb/ChangeLog
gdb/dwarf2/read.c