From 739f00a61c11444b5e16a71fe3a3dd3be0c48090 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 11 Aug 2023 09:53:42 -0400 Subject: [PATCH] bgpd: evpn code was not properly unlocking rd_dest Found some code where bgp was not unlocking the dest and rd_dest when walking the tree attempting to find something to install. Signed-off-by: Donald Sharp (cherry picked from commit 1e8ac95bfb757b85d02514dd0f708974cdc22899) --- bgpd/bgp_evpn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 28ea443c68..2b2cfa0f4c 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -3665,8 +3665,11 @@ static int install_uninstall_routes_for_vrf(struct bgp *bgp_vrf, int install) pi = pi->next) { ret = bgp_evpn_route_entry_install_if_vrf_match( bgp_vrf, pi, install); - if (ret) + if (ret) { + bgp_dest_unlock_node(rd_dest); + bgp_dest_unlock_node(dest); return ret; + } } } }