aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2013-05-03 22:16:46 +0200
committerKamil Dudka <kdudka@redhat.com>2013-05-06 15:00:10 +0200
commitb47cf4f688297d9cf87a39c8aa328d9d07540e66 (patch)
treec1afeb84295e42a3d54c475cd49e96034fe0fcf2 /src
parenta15b2b6c6204766ef391c1831fb4506635bab0a6 (diff)
tool_getparam: fix memleak in handling the -E option
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 582956279..3fed3fb85 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -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);
}