mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
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
This commit is contained in:
parent
2a41e23671
commit
f54b6c4bc2
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user