This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 27/40] fix cp-namespace.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:52:01 -0600
- Subject: [PATCH 27/40] fix cp-namespace.c
- References: <cover dot 1368124285 dot git dot tromey at redhat dot com>
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.
---
gdb/cp-namespace.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
--
1.8.1.4