X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=083add3f30f907eee80dc259b0e961f028e50ab3;hb=0f3d405741c89373f9eb51969f5cf9fccc5ce10d;hp=5769576cd0ea47f9d0f11255cadcbbc2aaf8e3b7;hpb=61a5b6b16273e5eaa2385eac6190edf5afa2014a;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 5769576cd..083add3f3 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -221,6 +221,7 @@ struct ltt_kernel_channel *trace_kernel_create_channel( lkc->stream_count = 0; lkc->event_count = 0; lkc->enabled = 1; + lkc->published_to_notification_thread = false; /* Init linked list */ CDS_INIT_LIST_HEAD(&lkc->events_list.head); CDS_INIT_LIST_HEAD(&lkc->stream_list.head); @@ -522,7 +523,8 @@ void trace_kernel_destroy_channel(struct ltt_kernel_channel *channel) /* Remove from channel list */ cds_list_del(&channel->list); - if (notification_thread_handle) { + if (notification_thread_handle + && channel->published_to_notification_thread) { status = notification_thread_command_remove_channel( notification_thread_handle, channel->fd, LTTNG_DOMAIN_KERNEL);