diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2020-06-09 11:49:44 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2020-06-09 11:49:44 -0400 |
commit | f54b6c4bc2f745fa32014819788c90126121729e (patch) | |
tree | c9a8c8e7561dfa3129a9b1bd8c506b535857120d /src | |
parent | 2a41e236716da4c41ebc1132bd36d9273bd0321f (diff) | |
download | curl-f54b6c4bc2f745fa32014819788c90126121729e.tar.gz |
tool_getparam: fix memory leak in parse_args
Prior to this change in Windows Unicode builds most parsed options would
not be freed.
Found using _CrtDumpMemoryLeaks().
Ref: https://github.com/curl/curl/issues/5545
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_getparam.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index ab2b75289..bd989fada 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -2302,6 +2302,8 @@ ParameterError parse_args(struct GlobalConfig *global, int argc, result = getparameter("--url", orig_opt, &used, global, config); } + + curlx_unicodefree(orig_opt); } if(result && result != PARAM_HELP_REQUESTED && |