From b47cf4f688297d9cf87a39c8aa328d9d07540e66 Mon Sep 17 00:00:00 2001 From: Kamil Dudka <kdudka@redhat.com> Date: Fri, 3 May 2013 22:16:46 +0200 Subject: [PATCH] tool_getparam: fix memleak in handling the -E option --- src/tool_getparam.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 582956279a..3fed3fb85b 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); } -- GitLab