From 9bc2ec5fac0abab41b0851aaabaf8fd27811c514 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Fri, 20 Sep 2019 11:15:12 -0400 Subject: [PATCH] Fix: Null check before destroying health_sessiond MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes coverity #1399735 Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 5f99bdbf6..a428630f8 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1819,7 +1819,9 @@ stop_threads: lttng_pipe_destroy(ust64_channel_monitor_pipe); lttng_pipe_destroy(kernel_channel_monitor_pipe); - health_app_destroy(health_sessiond); + if (health_sessiond) { + health_app_destroy(health_sessiond); + } exit_create_run_as_worker_cleanup: exit_options: sessiond_cleanup_lock_file(); -- 2.34.1