Fix: zero memory passed to create channel kernel ioctl
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 6 Apr 2015 16:16:11 +0000 (12:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 7 Apr 2015 15:04:34 +0000 (11:04 -0400)
Valgrind complains about uninitialized memory passed to ioctl.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/kernel-ctl/kernel-ctl.c

index 28ed06cbdaa50b5494c698b296e1bc576cdcfd6c..18cd95529cfef620d1e6305de0d88e2572fe147f 100644 (file)
@@ -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;
 
This page took 0.028142 seconds and 5 git commands to generate.