Browse Source

hardening iterator

pull/2117/head
Vladyslav Stepanov 4 days ago
parent
commit
8f9874570a
Signed by untrusted user: mittwerk
GPG Key ID: 2B26F0EEF5ED5122
  1. 2
      libi2pd_client/UDPTunnel.cpp

2
libi2pd_client/UDPTunnel.cpp

@ -203,7 +203,7 @@ namespace client
std::vector<std::shared_ptr<DatagramSessionInfo> > sessions; std::vector<std::shared_ptr<DatagramSessionInfo> > sessions;
std::lock_guard<std::mutex> lock (m_SessionsMutex); std::lock_guard<std::mutex> lock (m_SessionsMutex);
for (auto it: m_Sessions) for (const auto &it: m_Sessions)
{ {
auto s = it.second; auto s = it.second;
if (!s->m_Destination) continue; if (!s->m_Destination) continue;

Loading…
Cancel
Save