From: Florin Coras Date: Mon, 28 Oct 2019 15:46:37 +0000 (-0700) Subject: session: allow transport cleanup only if not deleted X-Git-Tag: v20.05-rc0~518 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=5afea129ed0c85f5313791d1d55fed6cdcc079c7;p=vpp.git session: allow transport cleanup only if not deleted Type: fix Change-Id: I51282182952a66be698226bace39626df4d67b9f Signed-off-by: Florin Coras --- diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index aff2cceaf14..1189d53b3cc 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -1282,8 +1282,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);