From: F. Aragon Date: Thu, 20 Sep 2018 14:00:40 +0000 (+0200) Subject: bgpd: null check (Coverity 1472965 1472966) X-Git-Tag: frr-7.1-dev~347^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F3057%2Fhead;p=mirror%2Ffrr.git bgpd: null check (Coverity 1472965 1472966) There were checks for null pointer after being dereferenced. Checks have been removed (we've discussed the no need of adding assert()'s because of similar code not requiring them). Signed-off-by: F. Aragon --- diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 552eb253ea..a74b584e90 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -1882,14 +1882,14 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp, } /* ipset create */ - if (bpm && !bpm->installed) + if (!bpm->installed) bgp_send_pbr_ipset_match(bpm, true); /* ipset add */ - if (bpme && !bpme->installed) + if (!bpme->installed) bgp_send_pbr_ipset_entry_match(bpme, true); /* iptables */ - if (bpm && !bpm->installed_in_iptable) + if (!bpm->installed_in_iptable) bgp_send_pbr_iptable(bpa, bpm, true); /* A previous entry may already exist