Fix: bad file descriptor on close in health check
authorDavid Goulet <dgoulet@efficios.com>
Tue, 14 Aug 2012 20:13:00 +0000 (16:13 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 14 Aug 2012 20:13:00 +0000 (16:13 -0400)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index 4b6a39dd5ecea5ef176139e7da2c6058f5884094..6955c80b099203b23cdab6f82eb94f2c52bbc28c 100644 (file)
@@ -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;
This page took 0.027758 seconds and 4 git commands to generate.