summaryrefslogtreecommitdiff
path: root/src/tool_parsecfg.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-07-10 15:22:13 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-07-10 15:49:14 +0200
commitbf7e887b2442783ab52ddf9d1348c52344fc96f1 (patch)
tree4039bb4b3d933fe802d7d62853edaa25094b70e1 /src/tool_parsecfg.c
parenteab25898b36c727236358b2395d53241b31e06ba (diff)
downloadcurl-bf7e887b2442783ab52ddf9d1348c52344fc96f1.tar.gz
tool_getparam: repair cleanarg
Regression since 9e5669f. Make sure the "cleaning" of command line arguments is done on the original argv[] pointers. As a bonus, it also exits better on out of memory error. Reported-by: Litter White Fixes #9128 Closes #9130
Diffstat (limited to 'src/tool_parsecfg.c')
-rw-r--r--src/tool_parsecfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index a166757f8..34eb5daa9 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -223,7 +223,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
#ifdef DEBUG_CONFIG
fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
#endif
- res = getparameter(option, param, &usedarg, global, operation);
+ res = getparameter(option, param, NULL, &usedarg, global, operation);
operation = global->last;
if(!res && param && *param && !usedarg)