]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix dangling ref.
authorKeith Seitz <keiths@redhat.com>
Tue, 15 Nov 2016 18:33:59 +0000 (10:33 -0800)
committerKeith Seitz <keiths@redhat.com>
Tue, 15 Nov 2016 18:33:59 +0000 (10:33 -0800)
gdb/compile/compile-cplus-types.c

index 26ea151912032987d7687d300ce3f5638683a5f4..62d75459ffc8cf036e22882ec6ca26a19c50a4ea 100644 (file)
@@ -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 &current = m_scopes.back ();
+  compile_scope current = m_scopes.back ();
+
   m_scopes.pop_back ();
 
   if (current.m_pushed)