[nemiver] Avoid reading freed memory



commit 945d71a025412367e364a8c36707eb85b814d5d7
Author: Dodji Seketeli <dodji seketeli org>
Date:   Mon Apr 25 13:46:36 2011 +0200

    Avoid reading freed memory
    
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::delete_visual_breakpoint): Don't read a map
    	element after it has been freed.

 src/persp/dbgperspective/nmv-dbg-perspective.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index e7b226e..b81b0bc 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -6936,8 +6936,9 @@ DBGPerspective::delete_visual_breakpoint (map<int, IDebugger::Breakpoint>::itera
         break;
     }
 
+    LOG_DD ("going to erase breakpoint number " << (int) a_i->first);
     m_priv->breakpoints.erase (a_i);
-    LOG_DD ("erased breakpoint number " << (int) a_i->first);
+
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]