From: Jens Axboe Date: Tue, 15 Apr 2014 14:25:16 +0000 (-0600) Subject: idletime: fix another missing unlock on error X-Git-Tag: fio-2.1.9~19 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d5b351d483aabb0d0a0acd2930640428aa8e6339;ds=sidebyside idletime: fix another missing unlock on error Signed-off-by: Jens Axboe --- 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) {