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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 19f5a7a  65111: Free direct buffers
19f5a7a is described below

commit 19f5a7a33697fc11ac3b4979d190b79f53fc69df
Author: remm <r...@apache.org>
AuthorDate: Thu Jan 28 15:57:16 2021 +0100

    65111: Free direct buffers
    
    Unlike for NIO and NIO2, the SocketBufferHandler free method was never
    called for the APR connector.
---
 java/org/apache/tomcat/util/net/AprEndpoint.java | 1 +
 webapps/docs/changelog.xml                       | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java 
b/java/org/apache/tomcat/util/net/AprEndpoint.java
index b0aacf5..14a2ed5 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -2317,6 +2317,7 @@ public class AprEndpoint extends AbstractEndpoint<Long> 
implements SNICallBack {
                     return;
                 }
                 closed = true;
+                socketBufferHandler.free();
                 if (sslOutputBuffer != null) {
                     ByteBufferUtils.cleanDirectBuffer(sslOutputBuffer);
                 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 61bab54..e6abb85 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -110,6 +110,10 @@
         Ensure that SNI provided host names are matched to SSL virtual host
         configurations in a case insensitive manner. (markt)
       </fix>
+      <fix>
+        <bug>65111</bug>: Free direct memory buffers in the APR connector.
+        (remm)
+      </fix>
     </changelog>
   </subsection>
 </section>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to