fix dwarf_decode_line_header
authorTom Tromey <tromey@redhat.com>
Mon, 22 Jul 2013 17:53:55 +0000 (17:53 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 22 Jul 2013 17:53:55 +0000 (17:53 +0000)
dwarf_decode_line_header has one return that is missing a call to
do_cleanups.  This patch adds it.

This was found using the cleanup checker.

* dwarf2read.c (dwarf_decode_line_header): Call do_cleanups
on all return paths.

gdb/ChangeLog
gdb/dwarf2read.c

index 3ad3fae9a50c14906c269537de7c3b7cf4f7d4df..d472569e3df9b4087548d9073100180c9f98adb4 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-22  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2read.c (dwarf_decode_line_header): Call do_cleanups
+       on all return paths.
+
 2013-07-22  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
 
        * ppc-linux-nat.c (PPC_DEBUG_FEATURE_DATA_BP_DAWR): New define.
index 94727a734a8ce336dd02ce6e3fe9b5ebe06aa6c7..70ab302fb312da0f337cc108fc75e0c5d6fbd4a6 100644 (file)
@@ -15704,6 +15704,7 @@ dwarf_decode_line_header (unsigned int offset, struct dwarf2_cu *cu)
   if (line_ptr + lh->total_length > (section->buffer + section->size))
     {
       dwarf2_statement_list_fits_in_line_number_section_complaint ();
+      do_cleanups (back_to);
       return 0;
     }
   lh->statement_program_end = line_ptr + lh->total_length;