summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-12-04 11:02:28 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-07 21:45:43 +0000
commit201fa41eb568d677d3f57401356fbeaba30ca0b5 (patch)
treea84e022f4d9929900bf9438fc9d67cd890573555
parentabfdb9e23b12fbc32d6173d673a20a07f631b5e7 (diff)
session: fix session_main_get_worker_if_valid
Type: fix Change-Id: Ie024792015f3c9c52102c9be03da63c79f3456af Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> (cherry picked from commit 901467ed75fa76e8fe4792459e3649d4aef4ddc7)
-rw-r--r--src/vnet/session/session.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 7b7addb0fb8..346af546856 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -598,7 +598,7 @@ session_main_get_worker (u32 thread_index)
static inline session_worker_t *
session_main_get_worker_if_valid (u32 thread_index)
{
- if (pool_is_free_index (session_main.wrk, thread_index))
+ if (thread_index > vec_len (session_main.wrk))
return 0;
return &session_main.wrk[thread_index];
}