From: Bart Van Assche Date: Sat, 10 Mar 2018 00:46:22 +0000 (-0800) Subject: helper_thread: Initialize all helper_data members before using it X-Git-Tag: fio-3.6~44 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b3090ff4e17888515997a8012f7b5bc5741ff493;p=fio.git helper_thread: Initialize all helper_data members before using it This patch avoids that Valgrind reports the following: ==10492== Thread 2: ==10492== Conditional jump or move depends on uninitialised value(s) ==10492== at 0x480295: helper_thread_main (helper_thread.c:89) ==10492== by 0x57B961A: start_thread (pthread_create.c:465) ==10492== by 0x5CEC98E: clone (clone.S:95) Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe --- diff --git a/helper_thread.c b/helper_thread.c index 64e5a3c9..b05f8212 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -156,7 +156,7 @@ int helper_thread_create(struct fio_mutex *startup_mutex, struct sk_out *sk_out) struct helper_data *hd; int ret; - hd = smalloc(sizeof(*hd)); + hd = scalloc(1, sizeof(*hd)); setup_disk_util(); steadystate_setup();