svn commit: r1851038 - in /tomcat/native/trunk: native/src/ssl.c xdocs/miscellaneous/changelog.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1851038 - in /tomcat/native/trunk: native/src/ssl.c xdocs/miscellaneous/changelog.xml

markt
Author: markt
Date: Fri Jan 11 12:59:15 2019
New Revision: 1851038

URL: http://svn.apache.org/viewvc?rev=1851038&view=rev
Log:
Fix some minor memory leaks that could occur after error conditions during TLS connector initialisation.

Modified:
    tomcat/native/trunk/native/src/ssl.c
    tomcat/native/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/native/trunk/native/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1851038&r1=1851037&r2=1851038&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/ssl.c (original)
+++ tomcat/native/trunk/native/src/ssl.c Fri Jan 11 12:59:15 2019
@@ -1286,10 +1286,12 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
     TCN_ASSERT(ctx != 0);
     ssl = SSL_new(c->ctx);
     if (ssl == NULL) {
+        free(handshakeCount);
         tcn_ThrowException(e, "cannot create new ssl");
         return 0;
     }
     if ((con = apr_pcalloc(c->pool, sizeof(tcn_ssl_conn_t))) == NULL) {
+        free(handshakeCount);
         tcn_ThrowAPRException(e, apr_get_os_error());
         return 0;
     }
@@ -1882,12 +1884,14 @@ TCN_IMPLEMENT_CALL(jboolean, SSL, setCip
     UNREFERENCED_STDARGS;
 
     if (ssl_ == NULL) {
+        TCN_FREE_CSTRING(ciphers);
         tcn_ThrowException(e, "ssl is null");
         return JNI_FALSE;
     }
 
     UNREFERENCED(o);
     if (!J2S(ciphers)) {
+        TCN_FREE_CSTRING(ciphers);
         return JNI_FALSE;
     }
     if (!SSL_set_cipher_list(ssl_, J2S(ciphers))) {

Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/xdocs/miscellaneous/changelog.xml?rev=1851038&r1=1851037&r2=1851038&view=diff
==============================================================================
--- tomcat/native/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/trunk/xdocs/miscellaneous/changelog.xml Fri Jan 11 12:59:15 2019
@@ -43,6 +43,10 @@
       Fix a minor memory leak. It occurred every time a TLS connector was
       started so the impact was very unlikely to be noticed. (markt)
     </fix>
+    <fix>
+      Fix some minor memory leaks that could occur after error conditions during
+      TLS connector initialisation. (markt)
+    </fix>
   </changelog>
 </section>
 <section name="Changes in 1.2.19">



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