From: David Goulet Date: Sat, 16 Jul 2011 19:13:55 +0000 (-0400) Subject: Fix double mutex unlock X-Git-Tag: v2.0-pre1~32 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=817153bb678559528701ef1da4bd90a981f3a7f3;p=lttng-tools.git Fix double mutex unlock Reported-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index c3e162341..46be1b536 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -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: