This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 1.3.x in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
commit 590386a7a12b20229dfddb0cc723117ebe55ce40 Author: Mark Thomas <[email protected]> AuthorDate: Thu Mar 12 10:00:20 2026 +0000 Fix a memory leak when parsing certificates --- native/src/sslcontext.c | 3 +++ xdocs/miscellaneous/changelog.xml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c index f9510c377..d3e2b229a 100644 --- a/native/src/sslcontext.c +++ b/native/src/sslcontext.c @@ -1338,6 +1338,9 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, addClientCACertificateRaw)(TCN_STDARGS, rv = JNI_FALSE; } + if (cert != NULL) { + X509_free(cert); + } free(charCert); return rv; } diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml index 86f66e874..b1411173f 100644 --- a/xdocs/miscellaneous/changelog.xml +++ b/xdocs/miscellaneous/changelog.xml @@ -33,6 +33,10 @@ </section> <section name="1.3.8" rtext="in development"> <changelog> + <fix> + Fix a memory leak when parsing certificates. Pull request <pr>44</pr> + provided by chenjp. (markt) + </fix> </changelog> </section> <section name="1.3.7" rtext="2026-03-10"> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
