pimd: Fix possible null of pim instance

Coverity shows a path where the pim instance may
be null.  In this code path if we have no pim
vrf there is nothing to do anyway so just return

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-04-21 07:08:53 -04:00
parent 7b343a9ed5
commit db865bf6ed

View file

@ -68,6 +68,8 @@ static int pim_zebra_interface_vrf_update(ZAPI_CALLBACK_ARGS)
vrf_id, new_vrf_id);
pim = pim_get_pim_instance(new_vrf_id);
if (!pim)
return 0;
if_update_to_new_vrf(ifp, new_vrf_id);