[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1400878027-22954-1-git-send-email-khoroshilov@ispras.ru>
Date: Sat, 24 May 2014 00:47:07 +0400
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Hans Verkuil <hverkuil@...all.nl>, Lubomir Rintel <lkundrak@...sk>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
Mauro Carvalho Chehab <m.chehab@...sung.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe()
Error handling code in usbtv_probe() misses usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
drivers/media/usb/usbtv/usbtv-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c
index 2f87ddfa469f..473fab81b602 100644
--- a/drivers/media/usb/usbtv/usbtv-core.c
+++ b/drivers/media/usb/usbtv/usbtv-core.c
@@ -91,6 +91,8 @@ static int usbtv_probe(struct usb_interface *intf,
return 0;
usbtv_video_fail:
+ usb_set_intfdata(intf, NULL);
+ usb_put_dev(usbtv->udev);
kfree(usbtv);
return ret;
--
1.8.3.2
--
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