X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=93b08fcaa4a32cddfb4deef66682e8a1b8ae6135;hb=4f061d4cf16d6625ed8649095ee6df6922b5262a;hp=53eaca2cbf944327b95aa0fced58bb564bb8013f;hpb=fa91dc52d62347d1c1ce56e995525f2c57adfc13;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 53eaca2cb..93b08fcaa 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -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); }