summaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:25:15 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:25:15 +0000
commit73b8d9dab1376f2d43ed8441eda335d2e1156a77 (patch)
tree0e4b8716f727c04089ed2f970e89580e97bdcbc0 /gdb/stabsread.c
parent7d266584031b069cc16e33071c064cc65a555218 (diff)
fix one bug in stabsread.c
Some code in stabsread.c can return without running cleanups. * stabsread.c (read_struct_type): Call do_cleanups along all return paths.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index c63ecc2e37..875541c6e1 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);
}