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

markt-asf 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 1ef601ad7f Don't free cert for OpenSSL 1.1.x since reference count 
isn't increased
1ef601ad7f is described below

commit 1ef601ad7f61d9f58129a1883b461c22fe98faf8
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jun 8 18:05:15 2026 +0100

    Don't free cert for OpenSSL 1.1.x since reference count isn't increased
---
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index 10bdb0853b..e0108cffbe 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -1253,7 +1253,9 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
                             }
                         }
                     } finally {
-                        X509_free(issuer);
+                        if (!openssl_h_Compatibility.OPENSSL || 
openssl_h_Compatibility.OPENSSL3) {
+                            X509_free(issuer);
+                        }
                     }
                 }
             }


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

Reply via email to