1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Fix possible use-after-free in lobby server

This commit is contained in:
Ivan Savenko 2025-01-26 11:17:53 +00:00
parent ca3e88ea30
commit 3965c6a0a1

View File

@ -325,7 +325,7 @@ void LobbyServer::onDisconnected(const NetworkConnectionPtr & connection, const
if(activeProxies.count(connection)) if(activeProxies.count(connection))
{ {
const auto & otherConnection = activeProxies.at(connection); const auto otherConnection = activeProxies.at(connection);
if (otherConnection) if (otherConnection)
otherConnection->close(); otherConnection->close();