From 02957cd47484f5c84c687db3ce01b084a53ae25b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 8 Oct 2014 09:55:22 -0600 Subject: [PATCH 1/1] Fix potential segfault on ENOENT on job file Introduced in commit 323255cc2269, if we fail opening, td may not be set. Signed-off-by: Jens Axboe --- init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.c b/init.c index a2377dc9..17684787 100644 --- a/init.c +++ b/init.c @@ -1432,7 +1432,8 @@ int __parse_jobs_ini(struct thread_data *td, int __err = errno; log_err("fio: unable to open '%s' job file\n", file); - td_verror(td, __err, "job file open"); + if (td) + td_verror(td, __err, "job file open"); return 1; } } -- 2.25.1