]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: don't add a new node for just --no-remote-name
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Feb 2023 11:32:48 +0000 (12:32 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 22 Feb 2023 07:43:13 +0000 (08:43 +0100)
Unless --remote-name-all is used.

Fixes #10564
Reported-by: u20221022 on github
Closes #10582

src/tool_getparam.c

index e2cc9948072cc005e6fb4c4f6e28cfccf9b9db6b..62609693b6744ad49a6336743289d400348ef148 100644 (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;