Add version command
[lttng-tools.git] / ltt-sessiond / main.c
index c3e1623419700308aa711f68ccce6c5dbb4bd4f1..69d5f6b7f1b10feb51463f86aba65f9b1386cbda 100644 (file)
@@ -105,6 +105,8 @@ static pthread_mutex_t kconsumerd_pid_mutex;        /* Mutex to control kconsumerd pid
  * This points to the tracing session list containing the session count and a
  * mutex lock. The lock MUST be taken if you iterate over the list. The lock
  * MUST NOT be taken if you call a public function in session.c.
+ *
+ * The lock is nested inside the structure: session_list_ptr->lock.
  */
 static struct ltt_session_list *session_list_ptr;
 
@@ -839,6 +841,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 +867,6 @@ static int start_kconsumerd(void)
        }
 
 end:
-       pthread_mutex_unlock(&kconsumerd_pid_mutex);
        return 0;
 
 error:
This page took 0.026088 seconds and 5 git commands to generate.