* dwarf2read.c (read_structure_type): Allocate null cleanup later.
authorTom Tromey <tromey@redhat.com>
Mon, 28 Jun 2010 19:05:42 +0000 (19:05 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 28 Jun 2010 19:05:42 +0000 (19:05 +0000)
gdb/ChangeLog
gdb/dwarf2read.c

index d8fbe97658587ea19d8e07c650d2f219639af01c..bf4f918e5172250bcd6565c16a69c6138e4ec4c5 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-28  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2read.c (read_structure_type): Allocate null cleanup later.
+
 2010-06-28  Doug Evans  <dje@google.com>
 
        * breakpoint.c (breakpoint_sals_to_pc): Delete arg address, unused.
index bab1fba759fbbf0fb94d150f15b93815cb60512f..43e7120c80c1cf75368df8ae458f4837cfce8e25 100644 (file)
@@ -5082,7 +5082,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
   struct type *type;
   struct attribute *attr;
   char *name;
-  struct cleanup *back_to = make_cleanup (null_cleanup, 0);
+  struct cleanup *back_to;
 
   /* If the definition of this type lives in .debug_types, read that type.
      Don't follow DW_AT_specification though, that will take us back up
@@ -5101,6 +5101,8 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
       return set_die_type (die, type, cu);
     }
 
+  back_to = make_cleanup (null_cleanup, 0);
+
   type = alloc_type (objfile);
   INIT_CPLUS_SPECIFIC (type);