include/elf/
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index bc77de8635f7899665e6402541b93862d9fe76c0..795d53b3f547326f7ea5ab506a875ef173eef6e5 100644 (file)
@@ -422,6 +422,9 @@ free_objfile (struct objfile *objfile)
       (*objfile->sf->sym_finish) (objfile);
     }
 
+  /* Discard any data modules have associated with the objfile.  */
+  objfile_free_data (objfile);
+
   /* We always close the bfd, unless the OBJF_KEEPBFD flag is set.  */
 
   if (objfile->obfd != NULL && !(objfile->flags & OBJF_KEEPBFD))
@@ -476,7 +479,6 @@ free_objfile (struct objfile *objfile)
 
   /* The last thing we do is free the objfile struct itself. */
 
-  objfile_free_data (objfile);
   if (objfile->name != NULL)
     {
       xfree (objfile->name);
This page took 0.063681 seconds and 4 git commands to generate.