Merge pull request #2117 from mittwerk/openssl

hardening iterator
This commit is contained in:
orignal 2024-10-28 08:39:44 -04:00 committed by GitHub
commit 3a229ea65c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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