From: beilei.xing@intel.com
To: jingjing.wu@intel.com
Cc: dev@dpdk.org, yuan.peng@intel.com, Beilei Xing <beilei.xing@intel.com>
Subject: [PATCH] net/idpf: fix memory leak
Date: Wed, 9 Nov 2022 06:29:13 +0000 [thread overview]
Message-ID: <20221109062913.18622-1-beilei.xing@intel.com> (raw)
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
next reply other threads:[~2022-11-09 6:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 6:29 beilei.xing [this message]
2022-11-09 7:19 ` Peng, Yuan
2022-11-09 7:25 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221109062913.18622-1-beilei.xing@intel.com \
--to=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=yuan.peng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).