tool_getparam: fix memleak in handling the -E option

This commit is contained in:
Kamil Dudka 2013-05-03 22:16:46 +02:00
parent a15b2b6c62
commit b47cf4f688
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}