Fix potential ByteBuf leak in bgp-inet 58/96958/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 17:18:26 +0000 (19:18 +0200)
commitf302e226dbed0cfbfb5fd925035063c3d3a61223
tree9bcd1237876a9eff75fbe27192f78c25d32d3d0e
parenta54bf7f59a51125c075c4327e64908e6d10268c6
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>
(cherry picked from commit 766073df92d59d588d42bb98c031c2c5e65909be)
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleBgpPrefixSidTlvRegistry.java