]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: bgp_evpn_es_route_del_all should not free dest until after looping
authorDonald Sharp <sharpd@nvidia.com>
Sun, 10 Sep 2023 13:19:05 +0000 (09:19 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 11 Sep 2023 16:45:59 +0000 (12:45 -0400)
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>
bgpd/bgp_evpn_mh.c

index 7700281cd2c65c7964bb2f0f511a29b1e88a142c..ffb1b17ec7f7c0bb242b3c79a32d5bd4626db7ec 100644 (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);
                     (pi != NULL) && (nextpi = pi->next, 1); pi = nextpi) {
                        bgp_path_info_delete(dest, pi);
-                       bgp_path_info_reap(dest, pi);
+                       dest = bgp_path_info_reap(dest, pi);
+
+                       assert(dest);
                }
        }
 }