From a422bb9db1a432f6094a186e243717512d50eec9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 30 Aug 2023 10:45:03 +0930 Subject: [PATCH] Re: readelf/objdump: Handle DWARF info with mixed types of range section PR 30791 * dwarf.c (free_debug_information): Free range_versions. --- binutils/dwarf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 7ce5d8efb2b..80bbc547bb1 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -3562,7 +3562,10 @@ free_debug_information (debug_info *ent) free (ent->have_frame_base); } if (ent->max_range_lists) - free (ent->range_lists); + { + free (ent->range_versions); + free (ent->range_lists); + } } /* Process the contents of a .debug_info section. -- 2.30.2