idletime: fix another missing unlock on error
[fio.git] / idletime.c
index 8d23154e54c94ee1ae5af8b05582fd2ed90dfc46..a366d2b16311bf6ec1b8e8d50fb84c44edc71eda 100644 (file)
@@ -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) {