From b6ac202c15fa8cb54ecc2d6bd77df2d0acf53ede Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Sat, 7 Dec 2013 11:13:50 +0900 Subject: [PATCH] Fix buffer leak in AbstractMemoryHttpData --- .../handler/codec/http/multipart/AbstractMemoryHttpData.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java index 48453c4ec6..91d3e7c5fd 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java @@ -152,7 +152,10 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData { @Override public void delete() { - // nothing to do + if (byteBuf != null) { + byteBuf.release(); + byteBuf = null; + } } @Override