summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPim van Pelt <pim@ipng.nl>2022-01-18 13:30:52 +0000
committerMatthew Smith <mgsmith@netgate.com>2022-01-18 14:33:15 +0000
commit4dc1149cc461dccf91601e8346c6489a2f37b53f (patch)
tree372e1b2e79a8851de9f73f6f1baabf855c3fe7f1 /src
parent5bb4cd1bea08e42d308136222963ff31bc521166 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/plugins/linux-cp/lcp_interface_sync.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/linux-cp/lcp_interface_sync.c b/src/plugins/linux-cp/lcp_interface_sync.c
index a4e343f6b9a..57a8e557379 100644
--- a/src/plugins/linux-cp/lcp_interface_sync.c
+++ b/src/plugins/linux-cp/lcp_interface_sync.c
@@ -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)
{