aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-03-10 07:13:20 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 08:12:25 +0000
commit69f3a473bc6a44aad00657aea041f7cec8cad9ae (patch)
treee46f02fdbd192ec521b923843e3cec76c6742f13 /src
parent458ab69af324086c9d75e5564a7f43f7a8a867c4 (diff)
lb: fix coverity warning
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e (cherry picked from commit a53068905eb3f005a5a6d324c37f51056fb49b3e)
Diffstat (limited to 'src')
-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 6c9ae605ceb..a8ad254202b 100644
--- a/src/plugins/lb/lb.c
+++ b/src/plugins/lb/lb.c
@@ -904,7 +904,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;
}