From: Enke Chen Date: Tue, 15 Oct 2024 17:23:10 +0000 (-0700) Subject: zebra: unlock node only after operation in zebra_free_rnh() X-Git-Tag: docker/9.1.3~24^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6558d68c876970b3b7bd7aed9423de0541096946;p=matthieu%2Ffrr.git 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) --- diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index aeb7ae35b6..0bfa2b9776 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);