]> git.baikalelectronics.ru Git - kernel.git/commit
media: stkwebcam: fix memory leak in stk_camera_probe
authorPavel Skripkin <paskripkin@gmail.com>
Wed, 7 Jul 2021 17:54:30 +0000 (19:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Sep 2021 06:56:40 +0000 (08:56 +0200)
commit0209f51f3f90eb529fed82719297caacdc9d040a
tree87a0429e443120e47c0a7b182f1bcc45343c7a72
parent6ea6e23c2a8d08cbe945d14155cf755a0008a40d
media: stkwebcam: fix memory leak in stk_camera_probe

commit 514e97674400462cc09c459a1ddfb9bf39017223 upstream.

My local syzbot instance hit memory leak in usb_set_configuration().
The problem was in unputted usb interface. In case of errors after
usb_get_intf() the reference should be putted to correclty free memory
allocated for this interface.

Fixes: 97d600c2c1a4 ("V4L/DVB (7019): V4L: add support for Syntek DC1125 webcams")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/stkwebcam/stk-webcam.c