From 177e6a0efe3bbedeacd148cd36b972e575406c87 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Tue, 15 Nov 2016 10:33:59 -0800 Subject: [PATCH] Fix dangling ref. --- gdb/compile/compile-cplus-types.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 26ea1519120..62d75459ffc 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -364,7 +364,8 @@ void compile_cplus_instance::leave_scope () { // Get the current scope and remove it from the internal list of scopes. - compile_scope ¤t = m_scopes.back (); + compile_scope current = m_scopes.back (); + m_scopes.pop_back (); if (current.m_pushed) -- 2.47.3