[nemiver/el6-branch] Avoid reading freed memory



commit 6bc9adab3d2b3cd8b7df6fc38d0fbd025f31090a
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 3d71db9..e43032b 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -7051,8 +7051,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]