summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorEnke Chen <enchen@paloaltonetworks.com>2024-10-15 10:23:10 -0700
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-10-16 05:14:03 +0000
commitef5aa73f2706c7d55cf546dfdbfe717bbed86158 (patch)
tree2c565c4887a1a181ce3842e3bf4d5497e2a9883c /zebra
parentc6149b55ed6f01a529b7194d9748f89d928e78ac (diff)
zebra: unlock node only after operation in zebra_free_rnh()
Move route_unlock_node() after rnh_list_del(). Signed-off-by: Enke Chen <enchen@paloaltonetworks.com> (cherry picked from commit 5b6ff51b8ae7f8c7348cea4de9543956f32641a7)
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_rnh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index b387e9949b..bbb659b554 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);