session: avoid transport cleanup if previously deleted 17/22217/3
authorFlorin Coras <fcoras@cisco.com>
Tue, 24 Sep 2019 14:18:51 +0000 (07:18 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 24 Sep 2019 15:52:48 +0000 (15:52 +0000)
Type: fix

Change-Id: I485d38c7d9473e2ad1cbd8e17a788ec8d29ab001
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/session/session.c

index f14e83f..cc9f4a8 100644 (file)
@@ -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);