From: Florin Coras Date: Tue, 24 Sep 2019 14:18:51 +0000 (-0700) Subject: session: avoid transport cleanup if previously deleted X-Git-Tag: v20.05-rc0~804 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=cac31a4a23241eb94e6982c049c0feb8b180c868;p=vpp.git session: avoid transport cleanup if previously deleted Type: fix Change-Id: I485d38c7d9473e2ad1cbd8e17a788ec8d29ab001 Signed-off-by: Florin Coras --- 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);