← Commit list

baafa5ff76

x2018
x2018
2025-11-10
SUCCESS Duration: 144s

Subject

schannel: fix potental memory leak of cert_store_path on four error paths

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/schannel.c+2 -0
@@ -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;