From b284075ab5414220496f396dff038003e57e3047 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 12 Apr 2007 12:57:27 +0200 Subject: [PATCH] A ->close_file() operation isn't strictly needed So be sure to check the pointer before calling it. Signed-off-by: Jens Axboe --- ioengines.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } - -- 2.25.1