aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index e486c2b0326..7131f51cdda 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -459,9 +459,7 @@ session_enqueue_notify (stream_session_t * s, u8 block)
return 0;
}
- /* Get session's server */
app = application_get_if_valid (s->app_index);
-
if (PREDICT_FALSE (app == 0))
{
clib_warning ("invalid s->app_index = %d", s->app_index);
@@ -509,7 +507,10 @@ session_dequeue_notify (stream_session_t * s)
application_t *app;
svm_queue_t *q;
- app = application_get (s->app_index);
+ app = application_get_if_valid (s->app_index);
+ if (PREDICT_FALSE (!app))
+ return -1;
+
if (application_is_builtin (app))
return 0;