From: x2018 Date: Fri, 31 Oct 2025 15:58:52 +0000 (+0800) Subject: schannel: properly close the certfile on error X-Git-Tag: curl-8_17_0~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27f55383fb9e3e8e84eaa06caaf164288a6b01ae;p=thirdparty%2Fcurl.git schannel: properly close the certfile on error Closes #19304 --- diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 55a99b3b43..50b81f6725 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -581,6 +581,8 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf, " for %s", blob ? "(memory blob)" : data->set.ssl.primary.clientcert); curlx_unicodefree(cert_path); + if(fInCert) + curlx_fclose(fInCert); return CURLE_SSL_CERTPROBLEM; }