From: Daniel Stenberg Date: Tue, 21 Feb 2023 11:32:48 +0000 (+0100) Subject: tool_getparam: don't add a new node for just --no-remote-name X-Git-Tag: curl-8_0_0~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=780ff2c95c9d20e15931d177c5cce358ee361a51;p=thirdparty%2Fcurl.git tool_getparam: don't add a new node for just --no-remote-name Unless --remote-name-all is used. Fixes #10564 Reported-by: u20221022 on github Closes #10582 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index e2cc994807..62609693b6 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -2165,9 +2165,12 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ if(config->url_out) /* existing node */ url = config->url_out; - else + else { + if(!toggle && !config->default_node_flags) + break; /* there was no free node, create one! */ config->url_out = url = new_getout(config); + } if(!url) return PARAM_NO_MEM;