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
ca212c2162
commit
0ef87697d5
@ -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