From eb4a2943f0cf59f2f33627c4fa6ed79300119328 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 14 Aug 2012 16:13:00 -0400 Subject: [PATCH] Fix: bad file descriptor on close in health check The new socket used to store the accept() socket was not initialized making the close() failed if NO health check command was previously done. Reported-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 4b6a39dd5..6955c80b0 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4852,7 +4852,7 @@ init_setup_error: */ static void *thread_manage_health(void *data) { - int sock = -1, new_sock, ret, i, pollfd, err = -1; + int sock = -1, new_sock = -1, ret, i, pollfd, err = -1; uint32_t revents, nb_fd; struct lttng_poll_event events; struct lttcomm_health_msg msg; -- 2.34.1