From 199bb3bae3cc40ebb87fb0c8cc21bd7b951be678 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 6 May 2016 19:44:54 +0200 Subject: [PATCH] stream-tcp: fix ssn returning to wrong thread pool --- src/stream-tcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index c339a0b264..72fb4eda9b 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -228,7 +228,11 @@ void StreamTcpSessionClear(void *ssnptr) StreamTcpSessionCleanup(ssn); + /* HACK: don't loose track of thread id */ + PoolThreadReserved a = ssn->res; memset(ssn, 0, sizeof(TcpSession)); + ssn->res = a; + PoolThreadReturn(ssn_pool, ssn); #ifdef DEBUG SCMutexLock(&ssn_pool_mutex); -- 2.47.2