aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lb/lb.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-03-10 07:13:20 -0400
committerDave Wallace <dwallacelf@gmail.com>2020-03-10 14:16:04 +0000
commita53068905eb3f005a5a6d324c37f51056fb49b3e (patch)
tree593a105b725aeaa12486f90a4059a9c7d0a4f008 /src/plugins/lb/lb.c
parent39ae0a07ac17640a7f8ba136eaaf334bfd504030 (diff)
lb: fix coverity warning
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e
Diffstat (limited to 'src/plugins/lb/lb.c')
-rw-r--r--src/plugins/lb/lb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c
index 2fc38e219a1..ab5e808ddab 100644
--- a/src/plugins/lb/lb.c
+++ b/src/plugins/lb/lb.c
@@ -907,7 +907,7 @@ static void lb_vip_add_adjacency(lb_main_t *lbm, lb_vip_t *vip,
vip->protocol, vip->port, &vip_idx))
{
lb_vip_t *exists_vip = lb_vip_get_by_index(vip_idx);
- *vip_prefix_index = exists_vip->vip_prefix_index;
+ *vip_prefix_index = exists_vip ? exists_vip->vip_prefix_index : ~0;
return;
}