Fix double mutex unlock
[lttng-tools.git] / ltt-sessiond / main.c
index c3e1623419700308aa711f68ccce6c5dbb4bd4f1..46be1b536f319e4644df8c37be70c7d343b21de9 100644 (file)
@@ -839,6 +839,7 @@ static int start_kconsumerd(void)
 
        pthread_mutex_lock(&kconsumerd_pid_mutex);
        if (kconsumerd_pid != 0) {
+               pthread_mutex_unlock(&kconsumerd_pid_mutex);
                goto end;
        }
 
@@ -864,7 +865,6 @@ static int start_kconsumerd(void)
        }
 
 end:
-       pthread_mutex_unlock(&kconsumerd_pid_mutex);
        return 0;
 
 error:
This page took 0.022669 seconds and 4 git commands to generate.