From: Victor Julien Date: Tue, 8 Mar 2016 14:13:03 +0000 (+0100) Subject: packet pool: turn bad check into BUG_ON X-Git-Tag: suricata-3.0.1RC1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ac1468c1bf8d9c062e63fcc5e71d15f6ed8e5eb;p=thirdparty%2Fsuricata.git packet pool: turn bad check into BUG_ON --- diff --git a/src/packet-queue.c b/src/packet-queue.c index c500971bd1..4b47beb2fb 100644 --- a/src/packet-queue.c +++ b/src/packet-queue.c @@ -175,12 +175,11 @@ Packet *PacketDequeue (PacketQueue *q) /* pull the bottom packet from the queue */ p = q->bot; + /* Weird issue: sometimes it looks that two thread arrive * here at the same time so the bot ptr is NULL (only on OS X?) */ - if (p == NULL) { - return NULL; - } + BUG_ON (p == NULL); /* more packets in queue */ if (q->bot->prev != NULL) {