X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=faf35cc7fc8f8a42c927325a15a161bd69215148;hp=b6b24a5a2b2b426fc78845bb8ca4bf7b1f16770a;hb=15dc512ac8cf2f59c8779f442f116a23975c950c;hpb=1bc6488673d85090bc546473ab6503f509ed43c3 diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index b6b24a5a2..faf35cc7f 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -759,11 +759,11 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) DBG("Tearing down kernel session"); /* - * Destroy channels on the consumer if in no output mode because the - * streams are in *no* monitor mode so we have to send a command to clean - * them up or else they leaked. + * Destroy channels on the consumer if at least one FD has been sent and we + * are in no output mode because the streams are in *no* monitor mode so we + * have to send a command to clean them up or else they leaked. */ - if (!ksess->output_traces) { + if (!ksess->output_traces && ksess->consumer_fds_sent) { int ret; struct consumer_socket *socket; struct lttng_ht_iter iter;