Merge pull request #6146 from AnuradhaKaruppiah/evpn-null-fix

zebra: fix NULL deref reported by coverity in evpn-pim cleanup
This commit is contained in:
Sri Mohana Singamsetty 2020-04-03 20:57:42 -07:00 committed by GitHub
commit 21e32bb409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10259,7 +10259,7 @@ static int zebra_evpn_pim_cfg_clean_up(struct zserv *client)
{
struct zebra_vrf *zvrf = zebra_vrf_get_evpn();
if (CHECK_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG)) {
if (zvrf && CHECK_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG)) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("VxLAN SG updates to PIM, stop");
UNSET_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG);