]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: pbra is already derefed in all paths to this spot
authorDonald Sharp <sharpd@nvidia.com>
Thu, 24 Sep 2020 12:16:57 +0000 (08:16 -0400)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 6 Oct 2020 12:54:25 +0000 (15:54 +0300)
The pbra variable is already derefed in all paths to this spot
and as such we cannot be NULL at this point.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_zebra.c

index 11e872f6b4ed1acef80b2bab692132937d5cd4cf..b20323852009da328ac8a3fe7f6f64c1d03aa3d2 100644 (file)
@@ -2367,7 +2367,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s,
        struct prefix pfx;
        uint8_t fam = AF_INET;
 
-       if (pbra && pbra->nh.type == NEXTHOP_TYPE_IPV6)
+       if (pbra->nh.type == NEXTHOP_TYPE_IPV6)
                fam = AF_INET6;
        stream_putl(s, 0); /* seqno unused */
        if (pbr)