X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=52b8cc7e0e8d4f2d4e017d746def763f599d9420;hp=54bdc667575ec48a0b2d5ac3fadcc999148150ae;hb=ba985c3a0cd870cd253081b703e722d4bff537a7;hpb=7682f30487cfe11af077c668193bb26f587a6081 diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 54bdc6675..52b8cc7e0 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); }