BUG-961 Fix Resource leak error from netty. 79/8179/1
authorMaros Marsalek <mmarsale@cisco.com>
Fri, 20 Jun 2014 15:00:50 +0000 (17:00 +0200)
committerMaros Marsalek <mmarsale@cisco.com>
Fri, 20 Jun 2014 15:00:50 +0000 (17:00 +0200)
Release ByteBuf instance in ChannelInputStream.

Change-Id: I5fdf9751e05b6975778693f603e1f12b17bb4ee7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/virtualsocket/ChannelInputStream.java

index 2a3eeb21a8ced14c43565e1c3dd9443b9ef85292..ba65b9ef34cf597aedadf1f5fa5afe6bb5cc646a 100644 (file)
@@ -93,6 +93,7 @@ public class ChannelInputStream extends InputStream implements ChannelInboundHan
         synchronized(lock) {
             this.bb.discardReadBytes();
             this.bb.writeBytes((ByteBuf) o);
+            ((ByteBuf) o).release();
             lock.notifyAll();
         }
     }