]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: The prn value may be NULL do not allow deref
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 6 Feb 2019 14:46:15 +0000 (09:46 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 27 Mar 2019 20:19:28 +0000 (16:19 -0400)
The prn value as passed in may be NULL as such do not
allow it to be derefed (even though it works now).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_rnh.c

index 8c866646bfd0cb7133449f22991821bea5e2fc10..ad8ffda2913fc8794037ee844426ac746cf6e632 100644 (file)
@@ -632,7 +632,7 @@ static void zebra_rnh_eval_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi,
         * the resolving route has some change (e.g., metric), there is a state
         * change.
         */
-       if (!prefix_same(&rnh->resolved_route, &prn->p)) {
+       if (!prefix_same(&rnh->resolved_route, prn ? NULL : &prn->p)) {
                if (prn)
                        prefix_copy(&rnh->resolved_route, &prn->p);
                else