From c74101efbbb06ea591b5c989afa3714689e843bb Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 6 Apr 2015 12:16:11 -0400 Subject: [PATCH] Fix: zero memory passed to create channel kernel ioctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Valgrind complains about uninitialized memory passed to ioctl. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/common/kernel-ctl/kernel-ctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 28ed06cbd..18cd95529 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -112,6 +112,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; -- 2.34.1