From db865bf6ed708e087eaef18d89f458044582cac4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 21 Apr 2023 07:08:53 -0400 Subject: [PATCH] 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 --- pimd/pim_zebra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 97b68c0a32..92dcbf9d1d 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -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);