* [PATCH] [media] tlg2300: fix leak at failure path in poseidon_probe()
@ 2014-05-30 22:20 Alexey Khoroshilov
0 siblings, 0 replies; only message in thread
From: Alexey Khoroshilov @ 2014-05-30 22:20 UTC (permalink / raw)
To: Huang Shijie, Hans Verkuil, Carvalho Chehab
Cc: Alexey Khoroshilov, linux-media, linux-kernel, ldv-project
Error handling code in poseidon_probe() misses usb_put_intf()
and usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
drivers/media/usb/tlg2300/pd-main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb/tlg2300/pd-main.c b/drivers/media/usb/tlg2300/pd-main.c
index 3316caa4733b..b31f4791b8ff 100644
--- a/drivers/media/usb/tlg2300/pd-main.c
+++ b/drivers/media/usb/tlg2300/pd-main.c
@@ -476,6 +476,8 @@ err_audio:
err_video:
v4l2_device_unregister(&pd->v4l2_dev);
err_v4l2:
+ usb_put_intf(pd->interface);
+ usb_put_dev(pd->udev);
kfree(pd);
return ret;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-30 22:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30 22:20 [PATCH] [media] tlg2300: fix leak at failure path in poseidon_probe() Alexey Khoroshilov
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).