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, 28 Apr 2015 14:36:21 +0000 (10:36 -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 f3ef93d3fd5a52bf1d8970d5d068a44cb8120541..a4c20092286568dea369b30d8dd5eeb5516ba89b 100644 (file)
@@ -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;
 
This page took 0.025149 seconds and 4 git commands to generate.