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
This commit is contained in:
Daniel Stenberg 2023-02-21 12:32:48 +01:00
parent ddff8ef706
commit 780ff2c95c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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;