Fix potential ByteBuf leak in bgp-inet 51/96951/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Jul 2021 15:43:14 +0000 (17:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Jul 2021 15:43:59 +0000 (17:43 +0200)
commit766073df92d59d588d42bb98c031c2c5e65909be
treecb80999f2e798b7bd7ff6188159ad86831955aad
parentfed701f05399b8b7c9bd4014f97d2c8a75cfc9ef
Fix potential ByteBuf leak in bgp-inet

We are using ByteBuf.readBytes() to frame a parsing chunk, but
we do not call ByteBuf.release() on it. Use ByteBuf.readSlice()
instead.

JIRA: BGPCEP-973
Change-Id: Ib0e6be0d8bca3518f0f318f137ca1a05196f84d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleBgpPrefixSidTlvRegistry.java