verify: clear IO verify state all_io_list before writing
authorJens Axboe <axboe@fb.com>
Tue, 15 Mar 2016 16:09:10 +0000 (09:09 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 15 Mar 2016 16:10:11 +0000 (09:10 -0700)
We only fill it partially sometimes, so ensure that we clear
the whole thing before writing it out. This fixes valgrind
complaining about writing unitialized memory.

Signed-off-by: Jens Axboe <axboe@fb.com>
verify.c

index 5d491d7677faf05add256f08ca4892f128ea2831..0f43a3e0b22fc3bdadd4efa45dcac67f5c209865 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -1385,6 +1385,7 @@ struct all_io_list *get_all_io_list(int save_mask, size_t *sz)
        *sz += nr * sizeof(struct thread_io_list);
        *sz += depth * sizeof(uint64_t);
        rep = malloc(*sz);
        *sz += nr * sizeof(struct thread_io_list);
        *sz += depth * sizeof(uint64_t);
        rep = malloc(*sz);
+       memset(rep, 0, *sz);
 
        rep->threads = cpu_to_le64((uint64_t) nr);
 
 
        rep->threads = cpu_to_le64((uint64_t) nr);