This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 25/40] fix one bug in stabsread.c
- From: Tom Tromey <tromey at redhat dot com>
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 09 May 2013 12:51:56 -0600
- Subject: [PATCH 25/40] fix one bug in stabsread.c
- References: <cover dot 1368124285 dot git dot tromey at redhat dot com>
Some code in stabsread.c can return without running cleanups.
* stabsread.c (read_struct_type): Call do_cleanups along
all return paths.
---
gdb/stabsread.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index c63ecc2..875541c 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -3515,7 +3515,10 @@ read_struct_type (char **pp, struct type *type, enum type_code type_code,
TYPE_LENGTH (type) = read_huge_number (pp, 0, &nbits, 0);
if (nbits != 0)
- return error_type (pp, objfile);
+ {
+ do_cleanups (back_to);
+ return error_type (pp, objfile);
+ }
set_length_in_type_chain (type);
}
--
1.8.1.4