mirror of
https://github.com/curl/curl.git
synced 2026-06-05 03:44:17 +03:00
tool_getparam: fix memleak in handling the -E option
This commit is contained in:
parent
a15b2b6c62
commit
b47cf4f688
1 changed files with 4 additions and 4 deletions
|
|
@ -1302,11 +1302,11 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
{
|
||||
char *certname, *passphrase;
|
||||
parse_cert_parameter(nextarg, &certname, &passphrase);
|
||||
if(certname) {
|
||||
GetStr(&config->cert, certname);
|
||||
}
|
||||
Curl_safefree(config->cert);
|
||||
config->cert = certname;
|
||||
if(passphrase) {
|
||||
GetStr(&config->key_passwd, passphrase);
|
||||
Curl_safefree(config->key_passwd);
|
||||
config->key_passwd = passphrase;
|
||||
}
|
||||
cleanarg(nextarg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue