]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: bgp_connected_add memory was being leaked in some cases 12558/head
authorDonald Sharp <sharpd@nvidia.com>
Thu, 22 Dec 2022 00:26:58 +0000 (19:26 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 22 Dec 2022 13:15:52 +0000 (08:15 -0500)
commit1c225152c0f19d2d52c38e8cdc982750e50f72e0
tree6c0d26672a3c3bd56b421067d52ec3c6a4a37110
parentc560f0698f425d4c054e13eccc9df87431cdb73f
bgpd: bgp_connected_add memory was being leaked in some cases

On shutdown, bgp calls an unlock for the bnc connected table,
via the bgp_connected_cleanup function.  This function is
only ever called on shutdown, so we know that bgp is going
away.  The refcount for the connected data can be more than
1.  Let's not worry about the refcount on shutdown and
just delete the nodes instead of leaving them around.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_nexthop.c