Fixing the below coverity issue.
>>> CID
1515545: (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "pim" when calling "pim_vxlan_set_peerlink_rif".
902 pim_vxlan_set_peerlink_rif(pim, NULL);
Signed-off-by: sarita patra <saritap@vmware.com>
*/
pim = pim_get_pim_instance(VRF_DEFAULT);
+ if (!pim) {
+ if (PIM_DEBUG_VXLAN)
+ zlog_debug("%s: Unable to find pim instance", __func__);
+ return;
+ }
+
if (enable)
vxlan_mlag.flags |= PIM_VXLAN_MLAGF_ENABLED;
else