From: Jens Axboe Date: Thu, 12 Apr 2007 10:57:27 +0000 (+0200) Subject: A ->close_file() operation isn't strictly needed X-Git-Tag: fio-1.15.2~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b284075ab5414220496f396dff038003e57e3047 A ->close_file() operation isn't strictly needed So be sure to check the pointer before calling it. Signed-off-by: Jens Axboe --- diff --git a/ioengines.c b/ioengines.c index 998c13ee..b9c6d714 100644 --- a/ioengines.c +++ b/ioengines.c @@ -305,7 +305,8 @@ done: get_file(f); return 0; err: - td->io_ops->close_file(td, f); + if (td->io_ops->close_file) + td->io_ops->close_file(td, f); return 1; } @@ -318,4 +319,3 @@ void td_io_close_file(struct thread_data *td, struct fio_file *f) put_file(td, f); } -