[nemiver/jump-to: 4/5] Avoid reading freed memory



commit 05bef5474e63d7e07faf83adcd619912f576c340
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 0c9575b..ad41242 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -7418,8 +7418,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]