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]
Date:	Thu,  7 Oct 2010 09:31:12 +0530
From:	Rahul Ruikar <rahul.ruikar@...il.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>, Tejun Heo <tj@...nel.org>,
	asanchez@...rowork.net, rjw@...k.pl, csanchez@...rowork.net
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Rahul Ruikar <rahul.ruikar@...il.com>
Subject: [PATCH] usb: core: endpoint: Fix error path

In function usb_create_ep_devs()
call put_device() when device_register() fails.

Signed-off-by: Rahul Ruikar <rahul.ruikar@...il.com>
---
 drivers/usb/core/endpoint.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c
index 3788e73..9da2505 100644
--- a/drivers/usb/core/endpoint.c
+++ b/drivers/usb/core/endpoint.c
@@ -202,7 +202,7 @@ int usb_create_ep_devs(struct device *parent,
 	return retval;
 
 error_register:
-	kfree(ep_dev);
+	put_device(&ep_dev->dev);
 exit:
 	return retval;
 }
-- 
1.7.2.3

--
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