From: Johan Samuelsson Date: Mon, 13 Mar 2017 09:21:25 +0000 (+0100) Subject: net/pcap: fix using mbuf after freeing it X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8dc7358b286e79d0acac5e0eb6e1a70a9b8652b0;p=dpdk.git 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 --- 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); } /*