This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/3] fix dwarf_decode_line_header
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Tue, 18 Jun 2013 13:44:27 -0600
- Subject: [PATCH 1/3] fix dwarf_decode_line_header
- References: <1371584669-1687-1-git-send-email-tromey at redhat dot com>
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/dwarf2read.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4cd0c0e..bbb8584 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -15655,6 +15655,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;
--
1.8.1.4