mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fix possible deadlock in error conditions
This commit is contained in:
parent
c8aed03ace
commit
f76b9d724b
1 changed files with 3 additions and 1 deletions
|
@ -2894,8 +2894,10 @@ bool Server::getClientInfo(
|
|||
m_clients.Lock();
|
||||
RemoteClient* client = m_clients.lockedGetClientNoEx(peer_id,Invalid);
|
||||
|
||||
if (client == NULL)
|
||||
if (client == NULL) {
|
||||
m_clients.Unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
*uptime = client->uptime();
|
||||
*ser_vers = client->serialization_version;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue