Fix: Unchecked session pointer when destroying a connection in relayd
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index ac30351522d159b744d3ee834fbb25cb5c6dd05b..aeb061330dbc83d911df33fd1e428fb75c22c165 100644 (file)
@@ -2253,7 +2253,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.024342 seconds and 4 git commands to generate.