From: David Goulet Date: Mon, 30 Sep 2013 20:24:48 +0000 (-0400) Subject: Fix: add missing pthread_join in sessiond X-Git-Tag: v2.4.0-rc1~126 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9563b0adcfa7d982efe7a1ff535a70d2961e3cf7;p=lttng-tools.git Fix: add missing pthread_join in sessiond Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index b3832e19c..3df9216b0 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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 */ }