From: Jérémie Galarneau Date: Sat, 6 May 2017 19:08:31 +0000 (-0400) Subject: Fix: free of uninitialized value on error path X-Git-Tag: v2.11.0-rc1~604 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=61a5b6b16273e5eaa2385eac6190edf5afa2014a;p=lttng-tools.git Fix: free of uninitialized value on error path 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 --- diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 876fda5bb..5769576cd 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -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);