Fix buffer leaks in Bzip2DecoderTest
This commit is contained in:
parent
448b0105b4
commit
bf85af5743
|
@ -186,9 +186,11 @@ public class Bzip2DecoderTest {
|
||||||
ByteBuf msg;
|
ByteBuf msg;
|
||||||
while ((msg = channel.readInbound()) != null) {
|
while ((msg = channel.readInbound()) != null) {
|
||||||
uncompressed.writeBytes(msg);
|
uncompressed.writeBytes(msg);
|
||||||
|
msg.release();
|
||||||
}
|
}
|
||||||
final byte[] result = new byte[uncompressed.readableBytes()];
|
final byte[] result = new byte[uncompressed.readableBytes()];
|
||||||
uncompressed.readBytes(result);
|
uncompressed.readBytes(result);
|
||||||
|
uncompressed.release();
|
||||||
|
|
||||||
assertArrayEquals(data, result);
|
assertArrayEquals(data, result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user