From 9015ee962e557e531348613b3b281e12e5b9fd37 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 27 May 2014 21:50:42 +0100 Subject: [PATCH] unlock mutex on return. --- lib/mosquitto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mosquitto.c b/lib/mosquitto.c index 3cdc6cf3..728c2eba 100644 --- a/lib/mosquitto.c +++ b/lib/mosquitto.c @@ -833,6 +833,7 @@ int mosquitto_loop(struct mosquitto *mosq, int timeout, int max_packets) maxfd = rc; } }else{ + pthread_mutex_unlock(&mosq->state_mutex); return MOSQ_ERR_NO_CONN; } pthread_mutex_unlock(&mosq->state_mutex);