]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: null check (Coverity 1472965 1472966) 3057/head
authorF. Aragon <paco@voltanet.io>
Thu, 20 Sep 2018 14:00:40 +0000 (16:00 +0200)
committerF. Aragon <paco@voltanet.io>
Thu, 20 Sep 2018 20:50:00 +0000 (22:50 +0200)
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 <paco@voltanet.io>
bgpd/bgp_pbr.c

index 552eb253ea105e1318fa816f07c5b3e1768cbf47..a74b584e90ad282104219044f0198e50c8a15d76 100644 (file)
@@ -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