commit | 682c7e66cab70b52d8245f51935f22b17fd519fc | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@fb.com> | Wed Oct 08 09:55:22 2014 -0600 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:57:22 2015 -0800 |
tree | 98a445a8b543979e38aa986476e0963f706e07ea | |
parent | 79ecc307e5dd47d9ea4f4162b1dd4d3d76a003ca [diff] |
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 <axboe@fb.com>
diff --git a/init.c b/init.c index a2377dc..1768478 100644 --- a/init.c +++ b/init.c
@@ -1432,7 +1432,8 @@ 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; } }