Commit f36be98
committed
bgpd: Fix route node lock leak in NHT resolved prefix marking
When bgp_afi_node_get() is called, it locks the node via
route_lock_node() before returning it to the caller. The caller is
responsible for unlocking the node when done.
Call chain:
bgp_afi_node_get()
bgp_node_get()
route_node_get()
route_lock_node()
In bgp_bnc_mark_nht_important() and bgp_nexthop_update(), the route
nodes obtained from bgp_afi_node_get() were not being unlocked after
use, causing a reference count leak.
These issues were introduced by:
- Recent commit #19008
(bgp_bnc_mark_nht_important function)
- VRF leaking commit #15238
(bgp_nexthop_update function)
Signed-off-by: Mike Dubrovsky <[email protected]>1 parent fc31cac commit f36be98
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
604 | 606 | | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
| 612 | + | |
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
| |||
968 | 971 | | |
969 | 972 | | |
970 | 973 | | |
| 974 | + | |
971 | 975 | | |
972 | 976 | | |
973 | 977 | | |
| |||
0 commit comments