If the posix TLS implementation is used, the packet pool is memset to
0 before use.
Also use proper 'free' function.
static void PktPoolThreadDestroy(void * buf)
{
- free(buf);
+ SCFreeAligned(buf);
}
static void TmqhPacketPoolInit(void)
SCLogError(SC_ERR_MEM_ALLOC, "malloc failed");
exit(EXIT_FAILURE);
}
+ memset(pool,0x0,sizeof(*pool));
+
int r = pthread_setspecific(pkt_pool_thread_key, pool);
if (r != 0) {
SCLogError(SC_ERR_MEM_ALLOC, "pthread_setspecific failed with %d", r);