From cbc06f92d07bb8d5dc9b88790ee4913172d75f62 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sat, 26 Jan 2013 19:29:46 +0100 Subject: [PATCH] core: add missing unlock in wsgi_req_accept Reported by Coverity as CID #970989. --- core/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/utils.c b/core/utils.c index 248efab5..b9c779b6 100644 --- a/core/utils.c +++ b/core/utils.c @@ -997,8 +997,10 @@ int wsgi_req_accept(int queue, struct wsgi_request *wsgi_req) { if (timeout > 0) { uwsgi_heartbeat(); // no need to continue if timed-out - if (ret == 0) + if (ret == 0) { + thunder_unlock; return -1; + } } #ifdef UWSGI_THREADING