linux-cp: fix possible null deref

Found by coverity as defect id 243763

Signed-off-by: Pim van Pelt <pim@ipng.nl>
Type: fix
Change-Id: Idbada5528a1f2625f6498072d538edf306268b6d
This commit is contained in:
Pim van Pelt
2022-01-18 13:30:52 +00:00
committed by Matthew Smith
parent 5bb4cd1bea
commit 4dc1149cc4

View File

@@ -46,6 +46,8 @@ lcp_itf_pair_sync_state (lcp_itf_pair_t *lip)
return;
sup_sw =
vnet_get_sw_interface_or_null (vnet_get_main (), sw->sup_sw_if_index);
if (!sup_sw)
return;
if (lip->lip_namespace)
{