Fix potential buffer leak in AbstractBinaryMemcacheDecoder
If a connection is closed unexpectedly while AbstractBinaryMemcacheDecoder decodes a message, the half-constructed message's content might not be released.
This commit is contained in:
parent
cde319dabd
commit
33b9bc02ed
@ -200,8 +200,8 @@ public abstract class AbstractBinaryMemcacheDecoder<M extends BinaryMemcacheMess
|
||||
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||
super.channelInactive(ctx);
|
||||
|
||||
if (currentMessage != null && currentMessage.extras() != null) {
|
||||
currentMessage.extras().release();
|
||||
if (currentMessage != null) {
|
||||
currentMessage.release();
|
||||
}
|
||||
|
||||
resetDecoder();
|
||||
|
Loading…
Reference in New Issue
Block a user