napatech: fix null-dereference of packet

pull/9441/head
Ralph Eastwood 2 years ago committed by Victor Julien
parent a4756138cf
commit 185f605d11

@ -927,17 +927,16 @@ TmEcode NapatechPacketLoop(ThreadVars *tv, void *data, void *slot)
}
Packet *p = PacketGetFromQueueOrAlloc();
#ifdef NAPATECH_ENABLE_BYPASS
p->ntpv.bypass = 0;
#endif
p->ntpv.rx_stream = ntv->rx_stream;
if (unlikely(p == NULL)) {
NT_NetRxRelease(ntv->rx_stream, packet_buffer);
SCReturnInt(TM_ECODE_FAILED);
}
#ifdef NAPATECH_ENABLE_BYPASS
p->ntpv.bypass = 0;
#endif
p->ntpv.rx_stream = ntv->rx_stream;
pkt_ts = NT_NET_GET_PKT_TIMESTAMP(packet_buffer);
/*

Loading…
Cancel
Save