aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2020-06-09 11:49:44 -0400
committerJay Satiro <raysatiro@yahoo.com>2020-06-09 11:49:44 -0400
commitf54b6c4bc2f745fa32014819788c90126121729e (patch)
treec9a8c8e7561dfa3129a9b1bd8c506b535857120d /src
parent2a41e236716da4c41ebc1132bd36d9273bd0321f (diff)
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.c2
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 &&