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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368079537-15328-3-git-send-email-libo.chen@huawei.com>
Date:	Thu, 9 May 2013 14:05:35 +0800
From:	Libo Chen <libo.chen@...wei.com>
To:	<stern@...land.harvard.edu>, <grant.likely@...aro.org>,
	<rob.herring@...xeda.com>
CC:	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<akpm@...ux-foundation.org>, <lizefan@...wei.com>,
	Libo Chen <libo.chen@...wei.com>
Subject: [PATCH RESEND 2/4] usb: isp1760-if: fix memleak when platform_get_resource fail

When platform_get_resource fail, we should release_mem_region

Signed-off-by: Libo Chen <libo.chen@...wei.com>
---
 drivers/usb/host/isp1760-if.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index bbb791b..a13709e 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -373,8 +373,10 @@ static int isp1760_plat_probe(struct platform_device *pdev)
 	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (!irq_res) {
 		pr_warning("isp1760: IRQ resource not available\n");
-		return -ENODEV;
+		ret = -ENODEV;
+		goto cleanup;
 	}
+
 	irqflags |= irq_res->flags & IRQF_TRIGGER_MASK;
 
 	if (priv) {
-- 
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ