From e66c73abcd65786d686a02113f8709fe071a5d7f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 1 Aug 2014 09:55:43 +0200 Subject: [PATCH] packet pool: init pthread key before using it In the packet pool code, it's critical to initialize the pthread key before using it. Applies only to the code used if __thread isn't supported. --- src/tmqh-packetpool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tmqh-packetpool.c b/src/tmqh-packetpool.c index 4d4f215ac4..16b0abe725 100644 --- a/src/tmqh-packetpool.c +++ b/src/tmqh-packetpool.c @@ -265,6 +265,10 @@ void PacketPoolInit(void) { extern intmax_t max_pending_packets; +#ifndef TLS + TmqhPacketPoolInit(); +#endif + PktPool *my_pool = GetThreadPacketPool(); SCMutexInit(&my_pool->return_stack.mutex, NULL); -- 2.47.3