DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/8] bus/dpaa: fix the resource leak issue
@ 2018-04-05  8:54 Hemant Agrawal
  2018-04-05  8:54 ` [dpdk-dev] [PATCH 2/8] bus/dpaa: fix the unchecked return value Hemant Agrawal
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Hemant Agrawal @ 2018-04-05  8:54 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, shreyansh.jain

From: Sunil Kumar Kori <sunil.kori@nxp.com>

Fixes: 9d32ef0f5d61 ("bus/dpaa: support creating dynamic HW portal")
Coverity issue: 268332
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 66838d2..07b29d5 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -160,6 +160,7 @@ struct qman_portal *fsl_qman_portal_create(void)
 				     &cpuset);
 	if (ret) {
 		error(0, ret, "pthread_getaffinity_np()");
+		kfree(q_pcfg);
 		return NULL;
 	}
 
@@ -168,12 +169,14 @@ struct qman_portal *fsl_qman_portal_create(void)
 		if (CPU_ISSET(loop, &cpuset)) {
 			if (q_pcfg->cpu != -1) {
 				pr_err("Thread is not affine to 1 cpu\n");
+				kfree(q_pcfg);
 				return NULL;
 			}
 			q_pcfg->cpu = loop;
 		}
 	if (q_pcfg->cpu == -1) {
 		pr_err("Bug in getaffinity handling!\n");
+		kfree(q_pcfg);
 		return NULL;
 	}
 
@@ -183,6 +186,7 @@ struct qman_portal *fsl_qman_portal_create(void)
 	ret = process_portal_map(&q_map);
 	if (ret) {
 		error(0, ret, "process_portal_map()");
+		kfree(q_pcfg);
 		return NULL;
 	}
 	q_pcfg->channel = q_map.channel;
@@ -217,6 +221,7 @@ struct qman_portal *fsl_qman_portal_create(void)
 	close(q_fd);
 err1:
 	process_portal_unmap(&q_map.addr);
+	kfree(q_pcfg);
 	return NULL;
 }
 
-- 
2.7.4

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

end of thread, other threads:[~2018-04-11 22:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05  8:54 [dpdk-dev] [PATCH 1/8] bus/dpaa: fix the resource leak issue Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 2/8] bus/dpaa: fix the unchecked return value Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 3/8] net/dpaa: fix the array overrun Hemant Agrawal
2018-04-09  5:29   ` Shreyansh Jain
2018-04-05  8:54 ` [dpdk-dev] [PATCH 4/8] net/dpaa: fix the oob access Hemant Agrawal
2018-04-09  7:23   ` Shreyansh Jain
2018-04-05  8:54 ` [dpdk-dev] [PATCH 5/8] bus/dpaa: fix resource leak Hemant Agrawal
2018-04-09  7:18   ` Shreyansh Jain
2018-04-05  8:54 ` [dpdk-dev] [PATCH 6/8] net/dpaa: update checksum for external pool obj Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 7/8] net/dpaa2: fix the implementation of xstats Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 8/8] bus/fslmc: configure separate portal for Ethernet Rx Hemant Agrawal
2018-04-09 10:22 ` [dpdk-dev] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 2/8] bus/dpaa: fix the unchecked return value Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 3/8] net/dpaa: fix the array overrun Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 4/8] net/dpaa: fix the oob access Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 5/8] bus/dpaa: fix resource leak Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 6/8] net/dpaa: update checksum for external pool obj Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 7/8] net/dpaa2: fix the implementation of xstats Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 8/8] bus/fslmc: configure separate portal for Ethernet Rx Hemant Agrawal
2018-04-11 22:20   ` [dpdk-dev] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue Thomas Monjalon

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