From: David Goulet Date: Tue, 14 Aug 2012 20:13:00 +0000 (-0400) Subject: Fix: bad file descriptor on close in health check X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=eb4a2943f0cf59f2f33627c4fa6ed79300119328;hp=09e26845dd435a5975299a380847dad06e0a6836 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 --- 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;