DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/idpf: fix memory leak
@ 2022-11-09  6:29 beilei.xing
  2022-11-09  7:19 ` Peng, Yuan
  0 siblings, 1 reply; 3+ messages in thread
From: beilei.xing @ 2022-11-09  6:29 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, yuan.peng, Beilei Xing

From: Beilei Xing <beilei.xing@intel.com>

This patch fixes memory leak during Tx split queue release.

Fixes: 19b58dba9dc3 ("net/idpf: support queue release")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/idpf/idpf_rxtx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
index b338a67de7..ef2fdb317d 100644
--- a/drivers/net/idpf/idpf_rxtx.c
+++ b/drivers/net/idpf/idpf_rxtx.c
@@ -213,7 +213,11 @@ idpf_tx_queue_release(void *txq)
 	if (q == NULL)
 		return;
 
-	rte_free(q->complq);
+	if (q->complq) {
+		rte_memzone_free(q->complq->mz);
+		rte_free(q->complq);
+	}
+
 	q->ops->release_mbufs(q);
 	rte_free(q->sw_ring);
 	rte_memzone_free(q->mz);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-09  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09  6:29 [PATCH] net/idpf: fix memory leak beilei.xing
2022-11-09  7:19 ` Peng, Yuan
2022-11-09  7:25   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).