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 <johan.xb.samuelsson@ericsson.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Johan Samuelsson 2017-03-13 10:21:25 +01:00 committed by Ferruh Yigit
parent e3efd85bf9
commit 8dc7358b28

View File

@ -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);
}
/*