From: Jens Axboe Date: Thu, 23 May 2013 17:54:43 +0000 (+0200) Subject: Fix segfault is bool option is used on command line and fails parsing X-Git-Tag: fio-2.1.1~15 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=bfb3ea221ed3b5ce4a0795cee778b965ee83cf9f Fix segfault is bool option is used on command line and fails parsing Signed-off-by: Jens Axboe --- 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);