X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession.c;h=4c57b1ac9bb832706d3f8bdb87313c694ce2004c;hb=20de85b6da7e0b6dd0d73bc8358e7c67564d0c36;hp=54d9b22c838ad59acb1ae371026355998b11c558;hpb=049dee954f6acfc21c15a1a2926f6fb36d58a3e1;p=vpp.git diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 54d9b22c838..4c57b1ac9bb 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -216,15 +216,12 @@ session_alloc (u32 thread_index) void session_free (session_t * s) { - if (CLIB_DEBUG) - { - u8 thread_index = s->thread_index; - clib_memset (s, 0xFA, sizeof (*s)); - pool_put (session_main.wrk[thread_index].sessions, s); - return; - } + session_worker_t *wrk = &session_main.wrk[s->thread_index]; + SESSION_EVT (SESSION_EVT_FREE, s); - pool_put (session_main.wrk[s->thread_index].sessions, s); + if (CLIB_DEBUG) + clib_memset (s, 0xFA, sizeof (*s)); + pool_put (wrk->sessions, s); } u8