[nemiver/gtk2-branch] Avoid reading freed memory



commit ac4bbb77d6a7e2085a99a183954c55c99750f24f
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 0b27e98..3184e17 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -7074,8 +7074,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]