Fix: free of uninitialized value on error path
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 6 May 2017 19:08:31 +0000 (15:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 6 May 2017 19:43:28 +0000 (15:43 -0400)
Reported-by: Coverity Scan
CID 1374805 (#1 of 1): Uninitialized pointer read (UNINIT)
uninit_use_in_call: Using uninitialized value extended when
calling free.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/trace-kernel.c

index 876fda5bbb7fd9ed8d25c0cafdd3c348ec466e7c..5769576cd0ea47f9d0f11255cadcbbc2aaf8e3b7 100644 (file)
@@ -181,7 +181,7 @@ struct ltt_kernel_channel *trace_kernel_create_channel(
                struct lttng_channel *chan)
 {
        struct ltt_kernel_channel *lkc;
-       struct lttng_channel_extended *extended;
+       struct lttng_channel_extended *extended = NULL;
 
        assert(chan);
 
This page took 0.033128 seconds and 4 git commands to generate.