From 0dac421f0fcd500d658d2fd68bc16416885a874a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 25 Feb 2014 13:43:17 -0800 Subject: [PATCH] Fix crash with --debug=file and NULL file return Don't attempt to dereference that, obviously. Signed-off-by: Jens Axboe --- io_u.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index 619fa252..a69efb76 100644 --- a/io_u.c +++ b/io_u.c @@ -1093,7 +1093,10 @@ static struct fio_file *__get_next_file(struct thread_data *td) td->file_service_file = f; td->file_service_left = td->file_service_nr - 1; out: - dprint(FD_FILE, "get_next_file: %p [%s]\n", f, f->file_name); + if (f) + dprint(FD_FILE, "get_next_file: %p [%s]\n", f, f->file_name); + else + dprint(FD_FILE, "get_next_file: NULL\n"); return f; } -- 2.25.1