From 8dc7358b286e79d0acac5e0eb6e1a70a9b8652b0 Mon Sep 17 00:00:00 2001 From: Johan Samuelsson Date: Mon, 13 Mar 2017 10:21:25 +0100 Subject: [PATCH] net/pcap: fix using mbuf after freeing it Fixes: 2269e7e815a2 ("pcap: add Rx and Tx byte counters") Cc: stable@dpdk.org Signed-off-by: Johan Samuelsson Acked-by: Ferruh Yigit --- drivers/net/pcap/rte_eth_pcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 7f0b650052..075e3bed55 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -293,9 +293,9 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } } - rte_pktmbuf_free(mbuf); num_tx++; tx_bytes += mbuf->pkt_len; + rte_pktmbuf_free(mbuf); } /* -- 2.20.1