From 1cbc8471335bc98605a6430e8eed1ff742bc07a2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 23 Oct 2016 05:53:47 +0200 Subject: [PATCH] In case we return false here, we should still unlock the mutex first --- runloop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runloop.c b/runloop.c index 11c0e1ae5a..69cb92698d 100644 --- a/runloop.c +++ b/runloop.c @@ -501,7 +501,12 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) { const char **ret = (const char**)data; if (!ret) + { +#ifdef HAVE_THREADS + slock_unlock(_runloop_msg_queue_lock); +#endif return false; + } *ret = msg_queue_pull(runloop_msg_queue); } #ifdef HAVE_THREADS