X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=876fda5bbb7fd9ed8d25c0cafdd3c348ec466e7c;hb=1065191b50b33888c6cf5f359c73bd97ee21f0bb;hp=d6ee8e8afb23401b2420e430bdd892dd0acc714d;hpb=e9404c27e7cc9d841785e6c4292c1add19fbc1cc;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index d6ee8e8af..876fda5bb 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -522,10 +522,12 @@ void trace_kernel_destroy_channel(struct ltt_kernel_channel *channel) /* Remove from channel list */ cds_list_del(&channel->list); - status = notification_thread_command_remove_channel( - notification_thread_handle, - channel->fd, LTTNG_DOMAIN_KERNEL); - assert(status == LTTNG_OK); + if (notification_thread_handle) { + status = notification_thread_command_remove_channel( + notification_thread_handle, + channel->fd, LTTNG_DOMAIN_KERNEL); + assert(status == LTTNG_OK); + } free(channel->channel->attr.extended.ptr); free(channel->channel); free(channel);