If rte_pktmbuf_alloc() fails on any segment that is not the initial
segment, previously allocated mbufs are not freed.
Fixes:
6db141c91e1f ("pcap: support jumbo frames")
Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
mbuf,
packet,
if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
mbuf,
packet,
+ header.caplen) == -1)) {
+ rte_pktmbuf_free(mbuf);
}
mbuf->pkt_len = (uint16_t)header.caplen;
}
mbuf->pkt_len = (uint16_t)header.caplen;