DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] baseband/acc100: fix a memory leak in acc100 queue setup
@ 2022-02-18 17:15 Weiguo Li
  0 siblings, 0 replies; only message in thread
From: Weiguo Li @ 2022-02-18 17:15 UTC (permalink / raw)
  To: nicolas.chautru; +Cc: dev

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-18 17:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 17:15 [PATCH] baseband/acc100: fix a memory leak in acc100 queue setup Weiguo Li

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).