Fix double mutex unlock
authorDavid Goulet <david.goulet@polymtl.ca>
Sat, 16 Jul 2011 19:13:55 +0000 (15:13 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Sat, 16 Jul 2011 19:13:55 +0000 (15:13 -0400)
Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
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.02744 seconds and 4 git commands to generate.