summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-09-10 15:46:25 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-09-11 18:45:59 +0200
commit3abbc2340a00041c970d8a4a4b4a766b1c1ed5f1 (patch)
tree84d80c2198dacb82f1767f3267aa976d7ba0dea1
parentbgpd: bgp_static_set ensure dest is still usable. (diff)
downloadfrr-3abbc2340a00041c970d8a4a4b4a766b1c1ed5f1.tar.xz
frr-3abbc2340a00041c970d8a4a4b4a766b1c1ed5f1.zip
bgpd: Ensure debug is printed before possible dest freed in install_evpn_route_entry_in_vrf
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--bgpd/bgp_evpn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index c97a53bf1..aa23f0676 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -3029,14 +3029,14 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
/* Process for route leaking. */
vpn_leak_from_vrf_update(bgp_get_default(), bgp_vrf, pi);
- bgp_dest_unlock_node(dest);
-
if (bgp_debug_zebra(NULL))
zlog_debug("... %s pi dest %p (l %d) pi %p (l %d, f 0x%x)",
new_pi ? "new" : "update", dest,
bgp_dest_get_lock_count(dest), pi, pi->lock,
pi->flags);
+ bgp_dest_unlock_node(dest);
+
return ret;
}