From: Victor Julien Date: Fri, 25 Jul 2014 11:50:38 +0000 (+0200) Subject: Fix packet pool pending stack adds X-Git-Tag: suricata-2.1beta1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d9278bef42b68bcf1530ad48bde8ba7a0d7ebfe;p=thirdparty%2Fsuricata.git Fix packet pool pending stack adds Add packets after the first as the list/stack head as well. --- diff --git a/src/tmqh-packetpool.c b/src/tmqh-packetpool.c index b816f4a974..1f7f5bd248 100644 --- a/src/tmqh-packetpool.c +++ b/src/tmqh-packetpool.c @@ -223,7 +223,7 @@ void PacketPoolReturnPacket(Packet *p) free(p); return; } - + PACKET_RECYCLE(p); if (pool == my_pool) { @@ -241,7 +241,7 @@ void PacketPoolReturnPacket(Packet *p) } else if (pending_pool == pool) { /* Another packet for the pending pool list. */ p->next = my_pool->pending_head; - my_pool->pending_head->next = p; + my_pool->pending_head = p; my_pool->pending_count++; if (my_pool->pending_count > MAX_PENDING_RETURN_PACKETS) { /* Return the entire list of pending packets. */