From 0bf3a2c07e8f18b7ab3cdf42a4c932af8f7280fc Mon Sep 17 00:00:00 2001 From: Mandeep Rohilla Date: Thu, 15 Jun 2017 08:17:41 -0400 Subject: [PATCH] net/vmxnet3: fix receive queue memory leak This addresses an mbuf leak in an error condition during packet receive. Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation") Cc: stable@dpdk.org Signed-off-by: Mandeep Rohilla Acked-by: Shrikrishna Khare --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index d8713a1e5f..13c73f66ee 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -800,6 +800,12 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) (int)(rcd - (struct Vmxnet3_RxCompDesc *) rxq->comp_ring.base), rcd->rxdIdx); rte_pktmbuf_free_seg(rxm); + if (rxq->start_seg) { + struct rte_mbuf *start = rxq->start_seg; + + rxq->start_seg = NULL; + rte_pktmbuf_free(start); + } goto rcd_done; } -- 2.20.1