Fix: initialize context list node on creation
authorDavid Goulet <dgoulet@efficios.com>
Thu, 16 Oct 2014 15:16:07 +0000 (11:16 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 16 Oct 2014 15:16:07 +0000 (11:16 -0400)
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 <dgoulet@efficios.com>
src/bin/lttng-sessiond/trace-kernel.c

index 8e074fd91b0dcbe829f8c053d32ac6e92766d32c..093297cb01ebc1216855401199b829b5a5659da2 100644 (file)
@@ -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;
 }
This page took 0.025774 seconds and 4 git commands to generate.