bgpd: bgp_evpn_es_route_del_all should not free dest until after looping

Again the dest pointer should be still locked by the table walk.  Ensure
that coverity is happy that this is not happening.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-10 09:19:05 -04:00
parent dade8dfdd6
commit 35f352c457

View File

@ -323,7 +323,9 @@ static void bgp_evpn_es_route_del_all(struct bgp *bgp, struct bgp_evpn_es *es)
for (pi = bgp_dest_get_bgp_path_info(dest); for (pi = bgp_dest_get_bgp_path_info(dest);
(pi != NULL) && (nextpi = pi->next, 1); pi = nextpi) { (pi != NULL) && (nextpi = pi->next, 1); pi = nextpi) {
bgp_path_info_delete(dest, pi); bgp_path_info_delete(dest, pi);
bgp_path_info_reap(dest, pi); dest = bgp_path_info_reap(dest, pi);
assert(dest);
} }
} }
} }