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:43:19 +0000 (10:43 -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 d153a1cff7dafbbc3460f7aac1baae55042263fd..e71d25f4a88e60d1395999c9a50ad6c3fbe1e508 100644 (file)
@@ -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;
 
This page took 0.026091 seconds and 4 git commands to generate.