From: Donald Sharp Date: Wed, 6 Feb 2019 14:46:15 +0000 (-0500) Subject: zebra: The prn value may be NULL do not allow deref X-Git-Tag: 7.1_pulled~129^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=27d0665c0aa47082d065303974dd698c222e7fdb;p=matthieu%2Ffrr.git zebra: The prn value may be NULL do not allow deref 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 --- diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 8c866646bf..ad8ffda291 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -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