From c0d950a0ae6bd9c10e86f1d564df17075fcca71e Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 5 Jun 2021 12:57:55 -0400 Subject: [PATCH] bgpd: bgp_vrf has already been derefed in all paths Coverity scan found this issue. The bgp_vrf variable in ensure_vrf_tovpn_sid() has already been derefed in all paths at this point in time. No need to check for it existing at this point. Signed-off-by: Donald Sharp --- bgpd/bgp_mplsvpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index f99d672c8a..564424a082 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -583,7 +583,7 @@ void ensure_vrf_tovpn_sid(struct bgp *bgp_vpn, struct bgp *bgp_vrf, afi_t afi) * skip when bgp vpn instance ins't allocated * or srv6 locator chunk isn't allocated */ - if (!bgp_vpn || !bgp_vpn->srv6_locator_chunks || !bgp_vrf) + if (!bgp_vpn || !bgp_vpn->srv6_locator_chunks) return; tovpn_sid_index = bgp_vrf->vpn_policy[afi].tovpn_sid_index;