From 5442163c36377e627c67e837468030c8490485aa Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Wed, 24 Oct 2018 15:21:18 +1000 Subject: [PATCH] [NC-1772] Release DisconnectMessage to avoid leaking memory allocation. (#130) --- .../tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java index 6c674c59ce..cff59037df 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java @@ -92,6 +92,8 @@ final class ApiHandler extends SimpleChannelInboundHandler { "Received Wire DISCONNECT, but unable to parse reason. Peer: {}", connection.getPeer().getClientId(), e); + } finally { + disconnect.release(); } connection.terminateConnection(reason, true);