mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
Fix possible deadlock in error conditions
This commit is contained in:
parent
c8aed03ace
commit
f76b9d724b
@ -2894,8 +2894,10 @@ bool Server::getClientInfo(
|
|||||||
m_clients.Lock();
|
m_clients.Lock();
|
||||||
RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id,Invalid);
|
RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id,Invalid);
|
||||||
|
|
||||||
if (client == NULL)
|
if (client == NULL) {
|
||||||
|
m_clients.Unlock();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
*uptime = client->uptime();
|
*uptime = client->uptime();
|
||||||
*ser_vers = client->serialization_version;
|
*ser_vers = client->serialization_version;
|
||||||
|
Loading…
Reference in New Issue
Block a user