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.
pull/1083/head
Victor Julien 11 years ago
parent a441441636
commit e66c73abcd

@ -265,6 +265,10 @@ void PacketPoolInit(void)
{ {
extern intmax_t max_pending_packets; extern intmax_t max_pending_packets;
#ifndef TLS
TmqhPacketPoolInit();
#endif
PktPool *my_pool = GetThreadPacketPool(); PktPool *my_pool = GetThreadPacketPool();
SCMutexInit(&my_pool->return_stack.mutex, NULL); SCMutexInit(&my_pool->return_stack.mutex, NULL);

Loading…
Cancel
Save