aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:29:06 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:29:06 +0000
commitc27e16e3f1dcf904e09c4d725bc6dbde7e9ef172 (patch)
treee1cb758fbbb879d70b63fe038ea264caea71a6af /gdb/cp-namespace.c
parent5ae85e4448395edaa514e8fccb508887472166a0 (diff)
downloadgdb-c27e16e3f1dcf904e09c4d725bc6dbde7e9ef172.zip
gdb-c27e16e3f1dcf904e09c4d725bc6dbde7e9ef172.tar.gz
gdb-c27e16e3f1dcf904e09c4d725bc6dbde7e9ef172.tar.bz2
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.
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index add4ccb..792ed48 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);