From: Tom Tromey Date: Thu, 30 May 2013 17:25:15 +0000 (+0000) Subject: fix one bug in stabsread.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73b8d9dab1376f2d43ed8441eda335d2e1156a77;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d50309dc291..6d51b21b519 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-30 Tom Tromey + + * stabsread.c (read_struct_type): Call do_cleanups along + all return paths. + 2013-05-30 Maciej W. Rozycki * mips-linux-tdep.c: Adjust formatting throughout. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index c63ecc2e371..875541c6e17 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); }