From: Jens Axboe Date: Thu, 15 May 2008 07:17:42 +0000 (+0200) Subject: Fix crash with iolog X-Git-Tag: fio-1.21-rc1~19 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=393ca7e973d8e23c8c90890915b08f7dac3e77c0 Fix crash with iolog Signed-off-by: Jens Axboe --- diff --git a/log.c b/log.c index 790d3a1e..8f92e93f 100644 --- a/log.c +++ b/log.c @@ -40,6 +40,13 @@ void log_file(struct thread_data *td, struct fio_file *f, if (!td->o.write_iolog_file) return; + + /* + * this happens on the pre-open/close done before the job starts + */ + if (!td->iolog_f) + return; + fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]); }