Browse Source

fixed crash

pull/14/head
orignal 11 years ago
parent
commit
ef7e81baae
  1. 2
      Garlic.cpp
  2. 4
      NetDb.cpp

2
Garlic.cpp

@ -236,8 +236,8 @@ namespace garlic @@ -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;

4
NetDb.cpp

@ -412,8 +412,8 @@ namespace data @@ -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 @@ -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);
}
}

Loading…
Cancel
Save