From: Tom Tromey Date: Thu, 30 May 2013 17:29:06 +0000 (+0000) Subject: fix cp-namespace.c X-Git-Tag: cygwin-1_7_19-release~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c27e16e3f1dcf904e09c4d725bc6dbde7e9ef172;p=thirdparty%2Fbinutils-gdb.git fix cp-namespace.c cp_lookup_symbol_imports_or_template could return without running cleanups. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call do_cleanups on all return paths. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 30b2bb0251e..55df48c30d0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-30 Tom Tromey + + * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call + do_cleanups on all return paths. + 2013-05-30 Tom Tromey * top.c (execute_command): Discard 'cleanup_if_error' cleanups. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index add4ccb913a..792ed48f344 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -499,7 +499,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, TYPE_N_TEMPLATE_ARGUMENTS (context), TYPE_TEMPLATE_ARGUMENTS (context)); if (result != NULL) - return result; + { + do_cleanups (cleanups); + return result; + } } do_cleanups (cleanups);