From ef7e81baae746d3ac887f948d5df79649b11d38a Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 24 Jan 2014 21:14:14 -0500 Subject: [PATCH] fixed crash --- Garlic.cpp | 2 +- NetDb.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Garlic.cpp b/Garlic.cpp index ad824fd7..cdb8860e 100644 --- a/Garlic.cpp +++ b/Garlic.cpp @@ -236,8 +236,8 @@ namespace garlic auto it = m_Sessions.find (destination->GetIdentHash ()); if (it != m_Sessions.end ()) { - m_Sessions.erase (it); delete it->second; + m_Sessions.erase (it); } GarlicRoutingSession * session = new GarlicRoutingSession (destination, 0); // not follow-on messages expected m_Sessions[destination->GetIdentHash ()] = session; diff --git a/NetDb.cpp b/NetDb.cpp index 05d9d9fa..3e6b83fa 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -412,8 +412,8 @@ namespace data else { // no more requests for detination possible. delete it - m_RequestedDestinations.erase (it); delete it->second; + m_RequestedDestinations.erase (it); } } else @@ -474,8 +474,8 @@ namespace data auto it = m_RequestedDestinations.find (dest); if (it != m_RequestedDestinations.end ()) { - m_RequestedDestinations.erase (it); delete it->second; + m_RequestedDestinations.erase (it); } }