media: cpia2: fix memory leak in cpia2_usb_probe
[ Upstream commit be8656e6 ] syzbot reported leak in cpia2 usb driver. The problem was in invalid error handling. v4l2_device_register() is called in cpia2_init_camera_struct(), but all error cases after cpia2_init_camera_struct() did not call the v4l2_device_unregister() Reported-by:<syzbot+d1e69c888f0d3866ead4@syzkaller.appspotmail.com> 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:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Lee Jones <joneslee@google.com> Change-Id: I6c3cc54a7e48c3161a9fcf11a10b9322c8ea424a
Loading
Please sign in to comment