diff options
-rw-r--r-- | toxcore/net_crypto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index cfc7d366..ddb0cc92 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -1322,8 +1322,10 @@ static int create_crypto_connection(Net_Crypto *c) | |||
1322 | ++c->crypto_connections_length; | 1322 | ++c->crypto_connections_length; |
1323 | memset(&(c->crypto_connections[id]), 0, sizeof(Crypto_Connection)); | 1323 | memset(&(c->crypto_connections[id]), 0, sizeof(Crypto_Connection)); |
1324 | 1324 | ||
1325 | if (pthread_mutex_init(&c->crypto_connections[id].mutex, NULL) != 0) | 1325 | if (pthread_mutex_init(&c->crypto_connections[id].mutex, NULL) != 0) { |
1326 | pthread_mutex_unlock(&c->connections_mutex); | ||
1326 | return -1; | 1327 | return -1; |
1328 | } | ||
1327 | } | 1329 | } |
1328 | 1330 | ||
1329 | pthread_mutex_unlock(&c->connections_mutex); | 1331 | pthread_mutex_unlock(&c->connections_mutex); |