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: <bdd20c00cba68044d82e387072b39f0176448e97.1520416785.git.arvind.yadav.cs@gmail.com>
Date:   Wed,  7 Mar 2018 15:31:30 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     m@...s.ch
Cc:     linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: [PATCH] ssb:: use put_device() if device_register fail

if device_register() returned an error! Always use put_device()
to give up the reference initialized.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/ssb/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 65420a9..c4449e0 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -521,6 +521,7 @@ static int ssb_devices_register(struct ssb_bus *bus)
 			ssb_err("Could not register %s\n", dev_name(dev));
 			/* Set dev to NULL to not unregister
 			 * dev on error unwinding. */
+			put_device(dev);
 			sdev->dev = NULL;
 			kfree(devwrap);
 			goto error;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ