From: David Goulet Date: Thu, 16 Oct 2014 15:16:07 +0000 (-0400) Subject: Fix: initialize context list node on creation X-Git-Tag: v2.6.0-rc1~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7b9445b31fd5fcf3db1e3a7c9d7f5b793308641c;p=lttng-tools.git 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 --- 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; }