X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=ef5abbab4c3b20fe8d39165012e27b756234a43e;hp=54bdc667575ec48a0b2d5ac3fadcc999148150ae;hb=ea9a44f03f3f6e144b5f7f312eee2a5f7a849ecb;hpb=df3c77c8dbbd102718f7149b075ba026d70a9e27 diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 54bdc6675..ef5abbab4 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -501,7 +501,9 @@ void trace_kernel_destroy_context(struct ltt_kernel_context *ctx) { assert(ctx); - cds_list_del(&ctx->list); + if (ctx->in_list) { + cds_list_del(&ctx->list); + } free(ctx); } @@ -549,7 +551,7 @@ void trace_kernel_destroy_channel(struct ltt_kernel_channel *channel) && channel->published_to_notification_thread) { status = notification_thread_command_remove_channel( notification_thread_handle, - channel->fd, LTTNG_DOMAIN_KERNEL); + channel->key, LTTNG_DOMAIN_KERNEL); assert(status == LTTNG_OK); } free(channel->channel->attr.extended.ptr);