diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-07-10 15:22:13 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-07-10 15:49:14 +0200 |
commit | bf7e887b2442783ab52ddf9d1348c52344fc96f1 (patch) | |
tree | 4039bb4b3d933fe802d7d62853edaa25094b70e1 /src/tool_parsecfg.c | |
parent | eab25898b36c727236358b2395d53241b31e06ba (diff) | |
download | curl-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.c | 2 |
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) |