summaryrefslogtreecommitdiff
path: root/gdb
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
commit2ddc5b46e057658b157c26045d74d7d3bbc0c271 (patch)
tree426c28681d5f990b324748b5bcff8b9090c5d5fa /gdb
parentc5b4e875304c5faf3658e6de1e45d27e4284976c (diff)
downloadgdb-2ddc5b46e057658b157c26045d74d7d3bbc0c271.tar.gz
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')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cp-namespace.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 30b2bb0251e..55df48c30d0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-05-30 Tom Tromey <tromey@redhat.com>
+ * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call
+ do_cleanups on all return paths.
+
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
* top.c (execute_command): Discard 'cleanup_if_error' cleanups.
2013-05-30 Tom Tromey <tromey@redhat.com>
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);