From: Donald Sharp Date: Sat, 15 Aug 2020 17:41:18 +0000 (-0400) Subject: zebra: zevpn cannot be null passed into zebra_evpn_es_evi_show_one_evpn X-Git-Tag: base_7.6~434^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ba49e033f5d6fc97a9aa1e407ac542d226f12ff4;p=mirror%2Ffrr.git zebra: zevpn cannot be null passed into zebra_evpn_es_evi_show_one_evpn In zebra_evpn_es_evi_show_vni the zevpn pointer if passed into zebra_evpn_es_evi_show_one_evi will crash if it is null and we have code that checks that it is non null and then immediately calls the function. Add a return to prevent a crash. Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index f71065cdcf..a406884187 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -358,6 +358,8 @@ void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj, vni_t vni, int detail) } else { if (!uj) vty_out(vty, "VNI %d doesn't exist\n", vni); + + return; } zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json, detail); }