From 50138f511c30d4d8fe2450c9a5e8fdf98e5d2862 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 16 Sep 2013 08:33:15 -0500 Subject: [PATCH] Fix: relayd: incorrectly placed exit labels Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-relayd/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index dc41caad0..9a68b2b2d 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -2530,30 +2530,33 @@ int main(int argc, char **argv) ret = live_start_threads(live_uri, relay_ctx, thread_quit_pipe); if (ret != 0) { ERR("Starting live viewer threads"); + goto exit_live; } -exit_listener: + live_stop_threads(); + +exit_live: ret = pthread_join(listener_thread, &status); if (ret != 0) { PERROR("pthread_join"); goto error; /* join error, exit without cleanup */ } -exit_worker: +exit_listener: ret = pthread_join(worker_thread, &status); if (ret != 0) { PERROR("pthread_join"); goto error; /* join error, exit without cleanup */ } -exit_dispatcher: +exit_worker: ret = pthread_join(dispatcher_thread, &status); if (ret != 0) { PERROR("pthread_join"); goto error; /* join error, exit without cleanup */ } - live_stop_threads(); +exit_dispatcher: lttng_ht_destroy(viewer_streams_ht); exit_relay_ctx_viewer_streams: -- 2.34.1