[PATCH 0/2] Fix memory leak with .debug_types

Tom Tromey
2025-10-23T17:19:34Z

I noticed a while ago that nothing in the tree ever calls mdict_free,
and looking deeper I found that .debug_types has a longstanding memory
leak.

Now that blockvectors are heap-allocated, this is relatively easy to
fix, which is what this series does.

Regression tested on x86-64 Fedora 40.

Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (2):
Two bug fixes in mdict_free
Free multidicts from blockvector

gdb/block.c | 6 ++++++
gdb/block.h | 2 ++
gdb/dictionary.c | 13 +++++++++----
3 files changed, 17 insertions(+), 4 deletions(-)
---
base-commit: 8eeb52e3c7701f03711d51a2209c39d85d109500
change-id: 20251023-mdict-free-47eec1d7635d

Best regards,
--
Tom Tromey <tom@tromey.com>