summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2022-12-27 21:07:17 +0100
committerGitHub <noreply@github.com>2022-12-27 21:07:17 +0100
commit7430278a2fc65f6237949be5f029f6713ed73b89 (patch)
tree77c818d59dcaa424da68bbb412321d1c60bc01c9 /bgpd/bgp_route.c
parentMerge pull request #12515 from opensourcerouting/fix/show_ip_bgp_detail_weird... (diff)
parentbgpd: bgp_connected_add memory was being leaked in some cases (diff)
downloadfrr-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.c6
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);
}
}
}