From: Jens Axboe Date: Mon, 7 Dec 2015 17:42:24 +0000 (-0700) Subject: init: have set_debug() check for NULL optarg X-Git-Tag: fio-2.2.13~43 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2706fa00e78f61110bc6a43413ee3451a4d8a5b5;p=fio.git init: have set_debug() check for NULL optarg Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index 353cc2b1..0100da21 100644 --- a/init.c +++ b/init.c @@ -1899,6 +1899,9 @@ static int set_debug(const char *string) char *opt; int i; + if (!string) + return 0; + if (!strcmp(string, "?") || !strcmp(string, "help")) { log_info("fio: dumping debug options:"); for (i = 0; debug_levels[i].name; i++) {