OSDN Git Service

media: vivid: use vfree() instead of kfree() for dev->bitmap_cap
authorAlexander Potapenko <glider@google.com>
Thu, 4 Apr 2019 14:56:46 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:23:52 +0000 (12:23 +0200)
commite39af96f4dc1e5030997711ed6e942ddc372b087
tree9a6ad7310e3708800561bedae6ab33098672313f
parenta04e71a0dbc62083bd31ae4d252d2c07a0035e4a
media: vivid: use vfree() instead of kfree() for dev->bitmap_cap

commit dad7e270ba712ba1c99cd2d91018af6044447a06 upstream.

syzkaller reported crashes on kfree() called from
vivid_vid_cap_s_selection(). This looks like a simple typo, as
dev->bitmap_cap is allocated with vzalloc() throughout the file.

Fixes: ef834f7836ec0 ("[media] vivid: add the video capture and output
parts")

Signed-off-by: Alexander Potapenko <glider@google.com>
Reported-by: Syzbot <syzbot+6c0effb5877f6b0344e2@syzkaller.appspotmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/vivid/vivid-vid-cap.c