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]
Date:	Thu, 19 Dec 2013 16:03:41 +0100
From:	Levente Kurusa <levex@...ux.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Levente Kurusa <levex@...ux.com>,
	Florian Fainelli <florian@...nwrt.org>
Subject: [PATCH 30/38] vlynq: add missing put_device call

This is required so that we give up the last reference to the device.
This will result in vlynq_device_release being called making the kfree()
in the errorpath unneccessary.

Signed-off-by: Levente Kurusa <levex@...ux.com>
---
 drivers/vlynq/vlynq.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
index 7b07135..71d5905 100644
--- a/drivers/vlynq/vlynq.c
+++ b/drivers/vlynq/vlynq.c
@@ -748,11 +748,14 @@ static int vlynq_probe(struct platform_device *pdev)
 	return 0;
 
 fail_register:
+	put_device(&dev->dev);
+	dev->dev = 0;
 	iounmap(dev->local);
 fail_remap:
 fail_request:
 	release_mem_region(regs_res->start, len);
-	kfree(dev);
+	if(dev)
+		kfree(dev);
 	return result;
 }
 
-- 
1.8.3.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