]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix packet pool pending stack adds
authorVictor Julien <victor@inliniac.net>
Fri, 25 Jul 2014 11:50:38 +0000 (13:50 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 25 Jul 2014 11:50:38 +0000 (13:50 +0200)
Add packets after the first as the list/stack head as well.

src/tmqh-packetpool.c

index b816f4a97415db9d01dd9308dc5de70714c53fad..1f7f5bd248c09981ea484569ea530c7c9ec6dc63 100644 (file)
@@ -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. */