From ebbb5fca5ca899a9a125aa2770d3fdf857186bac Mon Sep 17 00:00:00 2001 From: "Jorge Boncompte [DTI2]" Date: Mon, 7 May 2012 15:17:33 +0000 Subject: bgpd: fix for leaked struct bgp_adj_[in|out] on peer shutdown If a peer with soft-reconfiguration configured is cleared, the function bgp_clear_route_table() doesn't free the bgp_adj_in and bgp_adj_out structures of route nodes that for some reason, ej. denied by a filter, don't have routes attached "rn->info == NULL". Signed-off-by: Jorge Boncompte [DTI2] Reviewed-by: Leonid Rosenboim Signed-off-by: David Lamparter --- bgpd/bgp_route.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'bgpd/bgp_route.c') diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 2412503d..9251d2c2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2810,9 +2810,6 @@ bgp_clear_route_table (struct peer *peer, afi_t afi, safi_t safi, struct bgp_info *ri; struct bgp_adj_in *ain; struct bgp_adj_out *aout; - - if (rn->info == NULL) - continue; /* XXX:TODO: This is suboptimal, every non-empty route_node is * queued for every clearing peer, regardless of whether it is -- cgit v1.2.1