From: Mathieu Desnoyers Date: Mon, 6 Apr 2015 16:16:11 +0000 (-0400) Subject: Fix: zero memory passed to create channel kernel ioctl X-Git-Tag: v2.5.5~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=388d4b5b9c345fdd01793ccb65a8c43a5862bc15;p=lttng-tools.git Fix: zero memory passed to create channel kernel ioctl Valgrind complains about uninitialized memory passed to ioctl. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index d153a1cff..e71d25f4a 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -108,6 +108,7 @@ int kernctl_create_channel(int fd, struct lttng_channel_attr *chops) { struct lttng_kernel_channel channel; + memset(&channel, 0, sizeof(channel)); if (lttng_kernel_use_old_abi) { struct lttng_kernel_old_channel old_channel;