From: Gagandeep Singh <g.singh@nxp.com>
To: hemant.agrawal@nxp.com
Cc: Apeksha Gupta <apeksha.gupta@nxp.com>,
hkalra@marvell.com, stable@dpdk.org
Subject: [PATCH 5/9] bus/dpaa: fix resource leak in variable dev
Date: Wed, 3 Jul 2024 15:11:38 +0530 [thread overview]
Message-ID: <20240703094142.3021439-8-g.singh@nxp.com> (raw)
In-Reply-To: <20240703094142.3021439-1-g.singh@nxp.com>
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Resource leak:
variable dev is going out of scope leaks the storage.
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Cc: hkalra@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 6d7d9ef918..3155acb6cb 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -188,6 +188,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
@@ -239,6 +240,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
--
2.25.1
next prev parent reply other threads:[~2024-07-03 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240703094142.3021439-1-g.singh@nxp.com>
2024-07-03 9:41 ` [PATCH 4/9] bus/dpaa: fix bus scan for DMA devices Gagandeep Singh
2024-07-03 9:41 ` Gagandeep Singh [this message]
2024-07-03 9:41 ` [PATCH 6/9] common/dpaax: fix IOVA table cleanup Gagandeep Singh
2024-07-03 9:41 ` [PATCH 7/9] common/dpaax: fix array overrun issue Gagandeep Singh
2024-07-03 9:41 ` [PATCH 8/9] bus/dpaa: remove redundant file descriptor check Gagandeep Singh
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=20240703094142.3021439-8-g.singh@nxp.com \
--to=g.singh@nxp.com \
--cc=apeksha.gupta@nxp.com \
--cc=hemant.agrawal@nxp.com \
--cc=hkalra@marvell.com \
--cc=stable@dpdk.org \
/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).