Fix: add missing pthread_join in sessiond
authorDavid Goulet <dgoulet@efficios.com>
Mon, 30 Sep 2013 20:24:48 +0000 (16:24 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 30 Sep 2013 20:24:48 +0000 (16:24 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index b3832e19c67855cd9b4477f1c853a2d2bf90a9c5..3df9216b035df777e7b085bac81e957754923d02 100644 (file)
@@ -4774,7 +4774,7 @@ int main(int argc, char **argv)
                        ust_thread_manage_notify, (void *) NULL);
        if (ret != 0) {
                PERROR("pthread_create apps");
-               goto exit_apps;
+               goto exit_apps_notify;
        }
 
        /* Don't start this thread if kernel tracing is not requested nor root */
@@ -4795,9 +4795,16 @@ int main(int argc, char **argv)
        }
 
 exit_kernel:
+       ret = pthread_join(apps_notify_thread, &status);
+       if (ret != 0) {
+               PERROR("pthread_join apps notify");
+               goto error;     /* join error, exit without cleanup */
+       }
+
+exit_apps_notify:
        ret = pthread_join(apps_thread, &status);
        if (ret != 0) {
-               PERROR("pthread_join");
+               PERROR("pthread_join apps");
                goto error;     /* join error, exit without cleanup */
        }
 
This page took 0.028595 seconds and 4 git commands to generate.