Permalink
Browse files

Correct release buffers in RedisEncoderTest

Motivation:

RedisEncoderTest did not release all buffers correctly which could lead to leaks.

Modifications:

Call ByteBuf.release() after buffer is read.

Result:

No more leaks in RedisEncoderTest.
  • Loading branch information...
1 parent f70757d commit d1c8b099a50b5960c91f3ac938f2dc202cd3cec7 @normanmaurer normanmaurer committed with normanmaurer Nov 24, 2016
Showing with 1 addition and 0 deletions.
  1. +1 −0 codec-redis/src/test/java/io/netty/handler/codec/redis/RedisEncoderTest.java
@@ -175,6 +175,7 @@ private static ByteBuf readAll(EmbeddedChannel channel) {
ByteBuf read;
while ((read = channel.readOutbound()) != null) {
buf.writeBytes(read);
+ read.release();
}
return buf;
}

0 comments on commit d1c8b09

Please sign in to comment.