summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-09-24 07:18:51 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-01 22:06:54 +0000
commit4afd0a1298d48454b1b02ce716a499cc41a9f99e (patch)
tree947be90068393431371df70e93ef751a95abd667 /src/vnet/session/session.c
parentbd05baee48c14fd98ffd58e2de5abbf81a99f979 (diff)
session: avoid transport cleanup if previously deleted
Type: fix Change-Id: I485d38c7d9473e2ad1cbd8e17a788ec8d29ab001 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit cac31a4a23241eb94e6982c049c0feb8b180c868)
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index f14e83fe976..cc9f4a825c4 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1283,8 +1283,9 @@ session_transport_cleanup (session_t * s)
/* Delete from main lookup table before we axe the the transport */
session_lookup_del_session (s);
- transport_cleanup (session_get_transport_proto (s), s->connection_index,
- s->thread_index);
+ if (s->session_state != SESSION_STATE_TRANSPORT_DELETED)
+ transport_cleanup (session_get_transport_proto (s), s->connection_index,
+ s->thread_index);
/* Since we called cleanup, no delete notification will come. So, make
* sure the session is properly freed. */
session_free_w_fifos (s);