From: vivek Date: Fri, 15 May 2020 21:32:38 +0000 (-0700) Subject: bgpd: Free non-best paths also during table cleanup X-Git-Tag: base_7.5~371^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9514b37def9fd659b932ef33000453050a7fc12d;p=matthieu%2Ffrr.git bgpd: Free non-best paths also during table cleanup Non-best paths (path info structures) also need to be freed during table cleanup not only to release their memory but to also ensure any linkages are updated correctly. One such example is for EVPN where there is a link between the imported path info (in a L2 or L3 vrf instance) and its parent path info. Signed-off-by: Vivek Venkatraman --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index e8151d94ed..cd377b32ca 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4706,8 +4706,9 @@ static void bgp_cleanup_table(struct bgp *bgp, struct bgp_table *table, if (bgp_fibupd_safi(safi)) bgp_zebra_withdraw(p, pi, bgp, safi); - bgp_path_info_reap(rn, pi); } + + bgp_path_info_reap(rn, pi); } }