X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=iolog.c;h=4a79fc4667fc13eff4c62b9206a0dfefe0a5dfd4;hb=e1ce5b385c65803b170e512a1b5256bbe99f98f0;hp=917a446cbc5e811356d9197543cb7940088c9409;hpb=b2a432bfbb6d10e93f2c8f8092d6db672d45af0d;p=fio.git diff --git a/iolog.c b/iolog.c index 917a446c..4a79fc46 100644 --- a/iolog.c +++ b/iolog.c @@ -342,6 +342,9 @@ void trim_io_piece(const struct io_u *io_u) void write_iolog_close(struct thread_data *td) { + if (!td->iolog_f) + return; + fflush(td->iolog_f); fclose(td->iolog_f); free(td->iolog_buf);