* [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe()
@ 2014-05-23 20:47 Alexey Khoroshilov
2014-05-26 23:50 ` Lubomir Rintel
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2014-05-23 20:47 UTC (permalink / raw)
To: Hans Verkuil, Lubomir Rintel
Cc: Alexey Khoroshilov, Mauro Carvalho Chehab, linux-media,
linux-kernel, ldv-project
Error handling code in usbtv_probe() misses usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe()
2014-05-23 20:47 [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe() Alexey Khoroshilov
@ 2014-05-26 23:50 ` Lubomir Rintel
0 siblings, 0 replies; 2+ messages in thread
From: Lubomir Rintel @ 2014-05-26 23:50 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, linux-kernel,
ldv-project
On Sat, 2014-05-24 at 00:47 +0400, Alexey Khoroshilov wrote:
> Error handling code in usbtv_probe() misses usb_put_dev().
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Thank you!
Lubo
> ---
> 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-26 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23 20:47 [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe() Alexey Khoroshilov
2014-05-26 23:50 ` Lubomir Rintel
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).