summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-12-13 08:44:34 -0700
committerJens Axboe <axboe@kernel.dk>2017-12-13 08:44:34 -0700
commitc20c361255683ee138f0c239e48b315e25725f7e (patch)
tree4f18fd4de9a87a077cd6be1913c1074d069037b8 /server.c
parente80d780108fd33350f7c4a3032a8d2d06d7b102f (diff)
downloadfio-c20c361255683ee138f0c239e48b315e25725f7e.tar.gz
fio-c20c361255683ee138f0c239e48b315e25725f7e.tar.bz2
server: initialize first iolog header properly
We're sending potential stack garbage over the wire, init the whole pdu to zeroes before filling it in. This shuts up valgrind about using uninitialized memory. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'server.c')
-rw-r--r--server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.c b/server.c
index 76d662d4..62256141 100644
--- a/server.c
+++ b/server.c
@@ -1933,6 +1933,7 @@ int fio_send_iolog(struct thread_data *td, struct io_log *log, const char *name)
struct flist_head *entry;
int ret = 0;
+ memset(&pdu, 0, sizeof(pdu));
pdu.nr_samples = cpu_to_le64(iolog_nr_samples(log));
pdu.thread_number = cpu_to_le32(td->thread_number);
pdu.log_type = cpu_to_le32(log->log_type);