From bfb3ea221ed3b5ce4a0795cee778b965ee83cf9f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 23 May 2013 19:54:43 +0200 Subject: [PATCH] Fix segfault is bool option is used on command line and fails parsing Signed-off-by: Jens Axboe --- init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.c b/init.c index 7246bd83..0cc6a520 100644 --- a/init.c +++ b/init.c @@ -1726,8 +1726,13 @@ int parse_cmd_line(int argc, char *argv[], int client_type) } ret = fio_cmd_option_parse(td, opt, val); - if (ret) + if (ret) { + if (td) { + put_job(td); + td = NULL; + } do_exit++; + } if (!ret && !strcmp(opt, "ioengine")) { free_ioengine(td); -- 2.25.1