linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: usb: fix memory leak in stk_camera_probe
@ 2021-07-14  3:23 Dongliang Mu
  2021-07-23 10:11 ` Dongliang Mu
  0 siblings, 1 reply; 15+ messages in thread
From: Dongliang Mu @ 2021-07-14  3:23 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Dongliang Mu; +Cc: linux-media, linux-kernel

stk_camera_probe mistakenly execute usb_get_intf and increase the
refcount of interface->dev.

Fix this by removing the execution of usb_get_intf.

Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
Fixes: 0aa77f6c2954 ("[media] move the remaining USB drivers to drivers/media/usb")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
 drivers/media/usb/stkwebcam/stk-webcam.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index a45d464427c4..5bd8e85b9452 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -1311,7 +1311,6 @@ static int stk_camera_probe(struct usb_interface *interface,
 
 	dev->udev = udev;
 	dev->interface = interface;
-	usb_get_intf(interface);
 
 	if (hflip != -1)
 		dev->vsettings.hflip = hflip;
-- 
2.25.1


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

end of thread, other threads:[~2021-09-02 23:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14  3:23 [PATCH] media: usb: fix memory leak in stk_camera_probe Dongliang Mu
2021-07-23 10:11 ` Dongliang Mu
2021-09-02 10:23   ` Dongliang Mu
2021-09-02 10:39     ` Greg KH
2021-09-02 10:54       ` Mauro Carvalho Chehab
2021-09-02 10:59         ` Dongliang Mu
2021-09-02 11:10           ` Dongliang Mu
2021-09-02 11:15             ` Hans Verkuil
2021-09-02 11:22               ` Dongliang Mu
2021-09-02 18:14                 ` Pavel Skripkin
2021-09-02 23:51                   ` Dongliang Mu
2021-09-02 10:49     ` Hans Verkuil
2021-09-02 11:06       ` Dongliang Mu
2021-09-02 14:17     ` Dan Carpenter
2021-09-02 23:45       ` Dongliang Mu

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