You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2022/02/08 16:43:36 UTC

[mina] branch 2.0.X updated: Applied patch made in 2.1

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

elecharny pushed a commit to branch 2.0.X
in repository https://gitbox.apache.org/repos/asf/mina.git


The following commit(s) were added to refs/heads/2.0.X by this push:
     new a4d98f6  Applied patch made in 2.1
a4d98f6 is described below

commit a4d98f6830dbf7dbb7291e341b18f8c2225de4ce
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Tue Feb 8 17:43:00 2022 +0100

    Applied patch made in 2.1
---
 .../org/apache/mina/filter/codec/CumulativeProtocolDecoder.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/CumulativeProtocolDecoder.java b/mina-core/src/main/java/org/apache/mina/filter/codec/CumulativeProtocolDecoder.java
index fc3ace9..33f99ea 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/CumulativeProtocolDecoder.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/CumulativeProtocolDecoder.java
@@ -234,7 +234,11 @@ public abstract class CumulativeProtocolDecoder extends ProtocolDecoderAdapter {
     }
 
     private void removeSessionBuffer(IoSession session) {
-        session.removeAttribute(BUFFER);
+        IoBuffer buf = (IoBuffer) session.removeAttribute(BUFFER);
+        
+        if (buf != null) {
+            buf.free();
+        }
     }
 
     private void storeRemainingInSession(IoBuffer buf, IoSession session) {