mirror of
https://github.com/curl/curl.git
synced 2026-05-01 13:07:51 +03:00
schannel: fix potental memory leak of cert_store_path on four error paths
Closes #19423
This commit is contained in:
parent
87149c8383
commit
baafa5ff76
1 changed files with 2 additions and 0 deletions
|
|
@ -580,6 +580,7 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
|
|||
failf(data, "schannel: certificate format compatibility error "
|
||||
" for %s",
|
||||
blob ? "(memory blob)" : data->set.ssl.primary.clientcert);
|
||||
free(cert_store_path);
|
||||
curlx_unicodefree(cert_path);
|
||||
if(fInCert)
|
||||
curlx_fclose(fInCert);
|
||||
|
|
@ -597,6 +598,7 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf,
|
|||
int cert_find_flags;
|
||||
const char *cert_showfilename_error = blob ?
|
||||
"(memory blob)" : data->set.ssl.primary.clientcert;
|
||||
free(cert_store_path);
|
||||
curlx_unicodefree(cert_path);
|
||||
if(fInCert) {
|
||||
long cert_tell = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue