From 9123d0a5eee5182c1468c2a5930d1d29104b1f58 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 f3ef93d3f..a4c200922 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -109,6 +109,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