linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFC: port100: fix leak of usb_device
@ 2014-01-04 20:08 Alexey Khoroshilov
  2014-01-05  0:08 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2014-01-04 20:08 UTC (permalink / raw)
  To: Thierry Escande, Samuel Ortiz
  Cc: Alexey Khoroshilov, Lauro Ramos Venancio, Aloisio Almeida Jr,
	linux-wireless, linux-nfc, linux-kernel, ldv-project

port100_probe() calls usb_get_dev(), but there is no usb_put_dev()
in port100_disconnect(). The patch adds one.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/nfc/port100.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c
index 8a0571eb2627..a8555f81cbba 100644
--- a/drivers/nfc/port100.c
+++ b/drivers/nfc/port100.c
@@ -1509,6 +1509,7 @@ static void port100_disconnect(struct usb_interface *interface)
 
 	usb_free_urb(dev->in_urb);
 	usb_free_urb(dev->out_urb);
+	usb_put_dev(dev->udev);
 
 	kfree(dev->cmd);
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-05  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-04 20:08 [PATCH] NFC: port100: fix leak of usb_device Alexey Khoroshilov
2014-01-05  0:08 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).