Tidy dwarf1 cached section contents
[binutils-gdb.git] / bfd / dwarf1.c
index a80d19db7def118610a733673b7314f7209677f1..d7c50eaa06866e8fd8b8b6b9ef1490dfb18c159d 100644 (file)
@@ -593,3 +593,15 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd,
 
   return false;
 }
+
+void
+_bfd_dwarf1_cleanup_debug_info (bfd *abfd ATTRIBUTE_UNUSED, void **pinfo)
+{
+  struct dwarf1_debug* stash = *pinfo;
+
+  if (stash == NULL)
+    return;
+
+  free (stash->debug_section);
+  free (stash->line_section);
+}