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

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


The following commit(s) were added to refs/heads/main by this push:
     new 042452dad9 Don't free cert for OpenSSL 1.1.x since reference count 
isn't increased
042452dad9 is described below

commit 042452dad9fb79bfef941fa0725d4eb8bf0f1022
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 d00a165c19..7785f827cf 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