Skip to content

Commit

Permalink
Fix possible deadlock in error conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed May 10, 2014
1 parent c8aed03 commit f76b9d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit f76b9d7

Please sign in to comment.