patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 22.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 15 17:26:14 CEST 2024
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75332a8da8bfa24d03d24267470feeb38eab0eb8
Thanks.
Luca Boccassi
---
>From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta at nxp.com>
Date: Wed, 10 Jul 2024 14:25:28 +0530
Subject: [PATCH] bus/dpaa: fix memory leak in bus scan
[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
Resource leak:
variable dev is going out of scope leaks the storage.
Coverity issue: 373703
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Signed-off-by: Apeksha Gupta <apeksha.gupta at nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla at 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 0823553398..aaf2a5f43e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -187,6 +187,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;
}
@@ -238,6 +239,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.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.502998244 +0100
+++ 0036-bus-dpaa-fix-memory-leak-in-bus-scan.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001
+From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index b8f41ec069..1f6997c77e 100644
+index 0823553398..aaf2a5f43e 100644
@@ -23 +24 @@
-@@ -188,6 +188,7 @@ dpaa_create_device_list(void)
+@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
@@ -31 +32 @@
-@@ -239,6 +240,7 @@ dpaa_create_device_list(void)
+@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
More information about the stable
mailing list