1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04: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:
Jay Satiro 2020-06-09 11:49:44 -04:00
parent 2a41e23671
commit f54b6c4bc2

View File

@ -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 &&