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 {
|
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||||
super.channelInactive(ctx);
|
super.channelInactive(ctx);
|
||||||
|
|
||||||
if (currentMessage != null && currentMessage.extras() != null) {
|
if (currentMessage != null) {
|
||||||
currentMessage.extras().release();
|
currentMessage.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
resetDecoder();
|
resetDecoder();
|
||||||
|
Loading…
Reference in New Issue
Block a user