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