From d5b351d483aabb0d0a0acd2930640428aa8e6339 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 15 Apr 2014 08:25:16 -0600 Subject: [PATCH] idletime: fix another missing unlock on error Signed-off-by: Jens Axboe --- idletime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idletime.c b/idletime.c index 8d23154e..a366d2b1 100644 --- a/idletime.c +++ b/idletime.c @@ -73,8 +73,10 @@ static void *idle_prof_thread_fn(void *data) pthread_mutex_lock(&ipt->init_lock); /* exit if any other thread failed to start */ - if (ipc.status == IDLE_PROF_STATUS_ABORT) + if (ipc.status == IDLE_PROF_STATUS_ABORT) { + pthread_mutex_unlock(&ipt->init_lock); return NULL; + } retval = set_cpu_affinity(ipt); if (retval == -1) { -- 2.25.1