From 7b9445b31fd5fcf3db1e3a7c9d7f5b793308641c Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 16 Oct 2014 11:16:07 -0400 Subject: [PATCH] Fix: initialize context list node on creation This is to avoid a segfault when destroying a kernel context that has not been added to a channel. Fixes #845 Signed-off-by: David Goulet --- src/bin/lttng-sessiond/trace-kernel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 8e074fd91..093297cb0 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -196,6 +196,8 @@ struct ltt_kernel_context *trace_kernel_create_context( memcpy(&kctx->ctx, ctx, sizeof(kctx->ctx)); } + CDS_INIT_LIST_HEAD(&kctx->list); + error: return kctx; } -- 2.34.1