Fix memory leak in mdebugread.c
authorTom Tromey <tom@tromey.com>
Fri, 20 Jan 2023 14:11:46 +0000 (07:11 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 19 Feb 2023 19:51:06 +0000 (12:51 -0700)
commit69fb3874a70c8860d5eb6f2506cce673fced8ee6
tree59bac5186747d6835dcca8fe39af5078d0616334
parent548a89df2315322d51a6f961d46699663082b626
Fix memory leak in mdebugread.c

mdebugread.c allocates blocks on the heap.  However, this is a memory
leak if the corresponding objfile is ever destroyed.

This patch changes this code to use allocate_block instead, fixing a
FIXME from 2003.

I don't know how to test this patch.
gdb/mdebugread.c