diff options
author | Russ White <russ@riw.us> | 2022-12-27 21:07:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 21:07:17 +0100 |
commit | 7430278a2fc65f6237949be5f029f6713ed73b89 (patch) | |
tree | 77c818d59dcaa424da68bbb412321d1c60bc01c9 /bgpd/bgp_route.c | |
parent | Merge pull request #12515 from opensourcerouting/fix/show_ip_bgp_detail_weird... (diff) | |
parent | bgpd: bgp_connected_add memory was being leaked in some cases (diff) | |
download | frr-7430278a2fc65f6237949be5f029f6713ed73b89.tar.xz frr-7430278a2fc65f6237949be5f029f6713ed73b89.zip |
Merge pull request #12558 from donaldsharp/bgp_static_route_mem_leak
bgpd: static routes are leaked on shutdown
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 122fdd13c..f4b01ab27 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8917,7 +8917,11 @@ void bgp_redistribute_withdraw(struct bgp *bgp, afi_t afi, int type, bgp_aggregate_decrement(bgp, bgp_dest_get_prefix(dest), pi, afi, SAFI_UNICAST); bgp_path_info_delete(dest, pi); - bgp_process(bgp, dest, afi, SAFI_UNICAST); + if (!CHECK_FLAG(bgp->flags, + BGP_FLAG_DELETE_IN_PROGRESS)) + bgp_process(bgp, dest, afi, SAFI_UNICAST); + else + bgp_path_info_reap(dest, pi); } } } |