]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream-tcp: fix ssn returning to wrong thread pool
authorVictor Julien <victor@inliniac.net>
Fri, 6 May 2016 17:44:54 +0000 (19:44 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Aug 2016 09:45:17 +0000 (11:45 +0200)
src/stream-tcp.c

index c339a0b264910532d86958f8f6e02c84860c5ace..72fb4eda9bd062ed5c0f8b11f0b766a9c6a66db9 100644 (file)
@@ -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);