From 842c5259b613ae8ca843ca99abb97923bcc39817 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sun, 10 Sep 2023 09:47:44 -0400 Subject: [PATCH] bgpd: Ensure bgp_redistribute_withdraw dest is usable still Same story dest is locked during table walk. ensure coverity understands this. Signed-off-by: Donald Sharp --- bgpd/bgp_route.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 38324681fe..8320118a4e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8757,8 +8757,10 @@ void bgp_redistribute_withdraw(struct bgp *bgp, afi_t afi, int type, if (!CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)) bgp_process(bgp, dest, afi, SAFI_UNICAST); - else - bgp_path_info_reap(dest, pi); + else { + dest = bgp_path_info_reap(dest, pi); + assert(dest); + } } } } -- 2.39.5