diff options
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index f637d625616..9dc35238795 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -174,9 +174,15 @@ session_alloc (u32 thread_index) void session_free (session_t * s) { - pool_put (session_main.wrk[s->thread_index].sessions, s); if (CLIB_DEBUG) - clib_memset (s, 0xFA, sizeof (*s)); + { + u8 thread_index = s->thread_index; + clib_memset (s, 0xFA, sizeof (*s)); + pool_put (session_main.wrk[thread_index].sessions, s); + return; + } + SESSION_EVT_DBG (SESSION_EVT_FREE, s); + pool_put (session_main.wrk[s->thread_index].sessions, s); } void |