lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230706071310.38388-1-luhongfei@vivo.com>
Date:   Thu,  6 Jul 2023 15:13:09 +0800
From:   Lu Hongfei <luhongfei@...o.com>
To:     Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Rob Herring <robh@...nel.org>, Mark Brown <broonie@...nel.org>,
        Saravana Kannan <saravanak@...gle.com>,
        Ivan Bornyakov <i.bornyakov@...rotek.ru>,
        Lu Hongfei <luhongfei@...o.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Minghao Chi <chi.minghao@....com.cn>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     opensource.kernel@...o.com
Subject: [PATCH] drivers: bus: Fix resource leaks in for_each_available_child_of_node loop

Ensure child node references are decremented properly in
the error path.

Signed-off-by: Lu Hongfei <luhongfei@...o.com>
---
 drivers/bus/imx-weim.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 52a5d0447390..d05472f7c20f 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -251,6 +251,7 @@ static int weim_parse_dt(struct platform_device *pdev)
 		else
 			have_child = 1;
 	}
+	of_node_put(child);
 
 	if (have_child)
 		ret = of_platform_default_populate(pdev->dev.of_node,
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ