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: 6db141c91e ("pcap: support jumbo frames")
Cc: stable@dpdk.org

Signed-off-by: Aideen McLoughlin <aideen.mcloughlin@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Aideen McLoughlin 2019-07-11 14:59:46 +01:00 committed by Ferruh Yigit
parent 0603752e74
commit 49a0a2ffd5

View File

@ -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;
}
}