From: Weiguo Li <liwg06@foxmail.com>
To: nicolas.chautru@intel.com
Cc: dev@dpdk.org
Subject: [PATCH] baseband/acc100: fix a memory leak in acc100 queue setup
Date: Sat, 19 Feb 2022 01:15:05 +0800 [thread overview]
Message-ID: <tencent_AE1A22E7313D3C9EA71811B53A10DFBA2308@qq.com> (raw)
Add a memory free in error branch.
Fixes: 060e76729302 ("baseband/acc100: add queue configuration")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index f86474f7e0..cab9711e5f 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -833,6 +833,7 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
}
if (d == NULL) {
rte_bbdev_log(ERR, "Undefined device");
+ rte_free(q);
return -ENODEV;
}
--
2.25.1
reply other threads:[~2022-02-18 17:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_AE1A22E7313D3C9EA71811B53A10DFBA2308@qq.com \
--to=liwg06@foxmail.com \
--cc=dev@dpdk.org \
--cc=nicolas.chautru@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).