From dfb932adcef476590a9009346cf644fdd6989a18 Mon Sep 17 00:00:00 2001 From: Enke Chen Date: Tue, 15 Oct 2024 10:23:10 -0700 Subject: [PATCH] zebra: unlock node only after operation in zebra_free_rnh() Move route_unlock_node() after rnh_list_del(). Signed-off-by: Enke Chen (cherry picked from commit 5b6ff51b8ae7f8c7348cea4de9543956f32641a7) --- zebra/zebra_rnh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 28b83ce8b6f6..74aec5600fff 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -220,10 +220,9 @@ void zebra_free_rnh(struct rnh *rnh) if (rern) { rib_dest_t *dest; - route_unlock_node(rern); - dest = rib_dest_from_rnode(rern); rnh_list_del(&dest->nht, rnh); + route_unlock_node(rern); } } free_state(rnh->vrf_id, rnh->state, rnh->node);