Backported to glibc 2.8
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 53eaca2cbf944327b95aa0fced58bb564bb8013f..93b08fcaa4a32cddfb4deef66682e8a1b8ae6135 100644 (file)
@@ -44,6 +44,7 @@
 #include <common/common.h>
 #include <common/compat/poll.h>
 #include <common/compat/socket.h>
+#include <common/compat/endian.h>
 #include <common/defaults.h>
 #include <common/daemonize.h>
 #include <common/futex.h>
@@ -2389,7 +2390,7 @@ static void destroy_connection(struct lttng_ht *relay_connections_ht,
        connection_delete(relay_connections_ht, conn);
 
        /* For the control socket, we try to destroy the session. */
-       if (conn->type == RELAY_CONTROL) {
+       if (conn->type == RELAY_CONTROL && conn->session) {
                destroy_session(conn->session, conn->sessions_ht);
        }
 
This page took 0.023744 seconds and 4 git commands to generate.