Skip to content

Commit

Permalink
net/pcap: fix possible mbuf double freeing
Browse files Browse the repository at this point in the history
[ upstream commit 49a0a2f ]

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: 6db141c ("pcap: support jumbo frames")

Signed-off-by: Aideen McLoughlin <aideen.mcloughlin@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
Aideen McLoughlin authored and kevintraynor committed Aug 28, 2019
1 parent 6426f92 commit 27c4b1f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/pcap/rte_eth_pcap.c
Expand Up @@ -297,7 +297,6 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
mbuf->pkt_len,
ETHER_MAX_JUMBO_FRAME_LEN);

rte_pktmbuf_free(mbuf);
break;
}
}
Expand Down Expand Up @@ -359,7 +358,6 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
mbuf->pkt_len,
ETHER_MAX_JUMBO_FRAME_LEN);

rte_pktmbuf_free(mbuf);
break;
}
}
Expand Down

0 comments on commit 27c4b1f

Please sign in to comment.