From: Daniel Stenberg Date: Wed, 17 Jun 2020 22:51:37 +0000 (+0200) Subject: tool_getparam: repair the error message for unknown flag X-Git-Tag: curl-7_71_0~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ada7bd119179af1c7e206579c86ec6ea1b72996c;p=thirdparty%2Fcurl.git tool_getparam: repair the error message for unknown flag Follow-up to 9e5669f3880674 Detected by Coverity CID 1464582 ("Logically dead code") Closes #5577 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index bd989fada9..0cd11c4798 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -2303,7 +2303,8 @@ ParameterError parse_args(struct GlobalConfig *global, int argc, config); } - curlx_unicodefree(orig_opt); + if(!result) + curlx_unicodefree(orig_opt); } if(result && result != PARAM_HELP_REQUESTED &&