From 0ede849fb738e1ba6ecb48007432ebed7af0f7ec Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 24 Jun 2014 16:46:56 +0900 Subject: [PATCH] Fix buffer leaks in Bzip2DecoderTest --- .../io/netty/handler/codec/compression/Bzip2DecoderTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codec/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java b/codec/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java index d17d0ea1dd..d2ece7c52c 100644 --- a/codec/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java +++ b/codec/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java @@ -186,9 +186,11 @@ public class Bzip2DecoderTest { ByteBuf msg; while ((msg = channel.readInbound()) != null) { uncompressed.writeBytes(msg); + msg.release(); } final byte[] result = new byte[uncompressed.readableBytes()]; uncompressed.readBytes(result); + uncompressed.release(); assertArrayEquals(data, result); }