diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-04-21 07:08:53 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-04-21 07:08:53 -0400 |
| commit | db865bf6ed708e087eaef18d89f458044582cac4 (patch) | |
| tree | 6a40a66b58b6c74863ef6007f0b78fe0b17ec4dc /pimd/pim_zebra.c | |
| parent | 7b343a9ed5381d6e66cb68a6aa396d2194de7444 (diff) | |
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>
Diffstat (limited to 'pimd/pim_zebra.c')
| -rw-r--r-- | pimd/pim_zebra.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |
