From: Aideen McLoughlin Date: Thu, 11 Jul 2019 13:59:46 +0000 (+0100) Subject: net/pcap: fix possible mbuf double freeing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=49a0a2ffd5db;p=dpdk.git net/pcap: fix possible mbuf double freeing In the eth_pcap_tx() and eth_pcap_tx_dumper() functions mbufs were freed without incrementing num_tx. This may lead application also try to free or use invalid mbuf. To fix the issue, the mbuf freeing was removed. Fixes: 6db141c91e1f ("pcap: support jumbo frames") Cc: stable@dpdk.org Signed-off-by: Aideen McLoughlin Acked-by: Ferruh Yigit --- diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 7ff6dc38dc..d1dca2a381 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -349,7 +349,6 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) mbuf->pkt_len, RTE_ETHER_MAX_JUMBO_FRAME_LEN); - rte_pktmbuf_free(mbuf); break; } } @@ -435,7 +434,6 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) mbuf->pkt_len, RTE_ETHER_MAX_JUMBO_FRAME_LEN); - rte_pktmbuf_free(mbuf); break; } }