0
0
mirror of https://github.com/monero-project/kovri synced 2025-10-06 16:52:51 +02:00

Router: Remove invalid delete

Variable tmp pointed to the now-deleted TransitTunnel. The variable
was not needed anyway.

Rebased for PR #912

Signed-off-by: Tadeas Moravec <moravec.tadeas@gmail.com>
This commit is contained in:
Tadeas Moravec
2018-06-25 21:03:27 +02:00
parent 15bc9ef1e0
commit 9eec14a165

View File

@@ -672,10 +672,8 @@ void Tunnels::ManageTransitTunnels() {
const std::uint64_t ts = kovri::core::GetSecondsSinceEpoch();
for (auto it = m_TransitTunnels.begin(); it != m_TransitTunnels.end();) {
if (ts > it->second->GetCreationTime() + TUNNEL_EXPIRATION_TIMEOUT) {
auto tmp = it->second;
LOG(debug) << "Tunnels: transit tunnel " << tmp->GetTunnelID() << " expired";
LOG(debug) << "Tunnels: transit tunnel " << it->second->GetTunnelID() << " expired";
it = m_TransitTunnels.erase(it);
delete tmp;
} else {
it++;
}