summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-09-25 07:28:34 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-02 01:50:20 +0000
commitda3cc716c069c217d534712f46e621d797dd27cd (patch)
tree2066e63ea08556f2d9623ffe53b110db1fe0931a /src
parentd4aa3d9f885ee9b260008c4bde7884949a86afea (diff)
session: validate connection in session lookup del
Type: fix Change-Id: I4e2617f99064c5a96e4debae8b68716ca129ee73 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit e1e7fb88e47b0ec99d32ea0391d969542960391a)
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/session_lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index 4c13d016ba4..604344a27cd 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -338,7 +338,7 @@ session_lookup_del_session (session_t * s)
transport_connection_t *ts;
ts = transport_get_connection (session_get_transport_proto (s),
s->connection_index, s->thread_index);
- if (ts->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP)
+ if (!ts || (ts->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
return 0;
return session_lookup_del_connection (ts);
}