From 49a0a2ffd5db85f7bcc1de37391272f859aabbd4 Mon Sep 17 00:00:00 2001 From: Aideen McLoughlin Date: Thu, 11 Jul 2019 14:59:46 +0100 Subject: [PATCH] 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 --- drivers/net/pcap/rte_eth_pcap.c | 2 -- 1 file changed, 2 deletions(-) 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; } } -- 2.20.1