This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 50a8fdf6b6 Fix a couple more places where the key needs to be released
50a8fdf6b6 is described below
commit 50a8fdf6b69ca204fbb5d0c5d3abc898a217c90f
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Apr 8 17:52:40 2026 +0100
Fix a couple more places where the key needs to be released
---
java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 95a9c54749..8cce27d5db 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -1071,11 +1071,13 @@ public class OpenSSLContext implements
org.apache.tomcat.util.net.SSLContext {
if (MemorySegment.NULL.equals(cert)) {
log.error(sm.getString("openssl.errorLoadingCertificateWithError",
certificate.getCertificateFile(),
OpenSSLLibrary.getLastError()));
+ EVP_PKEY_free(key);
return false;
}
}
if (SSL_CTX_use_certificate(state.sslCtx, cert) <= 0) {
logLastError("openssl.errorLoadingCertificate");
+ EVP_PKEY_free(key);
X509_free(cert);
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]