From: Keith Seitz Date: Tue, 15 Nov 2016 18:33:59 +0000 (-0800) Subject: Fix dangling ref. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=177e6a0efe3bbedeacd148cd36b972e575406c87;p=thirdparty%2Fbinutils-gdb.git Fix dangling ref. --- 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)