aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-05-11 00:14:57 +0200
committersapier <Sapier at GMX dot net>2014-05-11 00:14:57 +0200
commitf76b9d724b322875016005763ae8389c3c23e5f1 (patch)
tree15f6dc501e456a6c47be8954fc6216bb5f8692cc /src
parentc8aed03ace88ad979af54f0af2707f6ed9db5655 (diff)
downloadminetest-f76b9d724b322875016005763ae8389c3c23e5f1.tar.gz
minetest-f76b9d724b322875016005763ae8389c3c23e5f1.tar.bz2
minetest-f76b9d724b322875016005763ae8389c3c23e5f1.zip
Fix possible deadlock in error conditions
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 288f254ed..22efca670 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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;