Re: readelf/objdump: Handle DWARF info with mixed types of range section
authorAlan Modra <amodra@gmail.com>
Wed, 30 Aug 2023 01:15:03 +0000 (10:45 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Aug 2023 01:52:23 +0000 (11:22 +0930)
PR 30791
* dwarf.c (free_debug_information): Free range_versions.

binutils/dwarf.c

index 7ce5d8efb2b6c8b483163fa77b13016fc2fa88ea..80bbc547bb1b37453bf707dad45d8f5dd38e99ec 100644 (file)
@@ -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.