This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 43105ace09 One more location where EVP_PKEY_free is required spotted 
by CoPilot
43105ace09 is described below

commit 43105ace095b7d97c39b376a71b6a609d98cbf6f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 9 11:50:35 2026 +0100

    One more location where EVP_PKEY_free is required spotted by CoPilot
---
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java | 1 +
 1 file changed, 1 insertion(+)

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 9ea93952ca..5f420a9a72 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -1249,6 +1249,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
                 }
                 if (SSL_CTX_use_certificate(state.sslCtx, x509cert) <= 0) {
                     logLastError("openssl.errorLoadingCertificate");
+                    EVP_PKEY_free(privateKeyAddress);
                     X509_free(x509cert);
                     return false;
                 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to