linux/drivers/media/test-drivers
Hans Verkuil 112024a3b6 media: vidtv: move kfree(dvb) to vidtv_bridge_dev_release()
Adding kfree(dvb) to vidtv_bridge_remove() will remove the memory
too soon: if an application still has an open filehandle to the device
when the driver is unloaded, then when that filehandle is closed, a
use-after-free access takes place to the freed memory.

Move the kfree(dvb) to vidtv_bridge_dev_release() instead.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 76e21bb8be ("media: vidtv: Fix memory leak in remove")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-10-19 08:08:19 +01:00
..
vicodec media: vicodec: Do not zero reserved fields 2021-01-27 13:21:44 +01:00
vidtv media: vidtv: move kfree(dvb) to vidtv_bridge_dev_release() 2021-10-19 08:08:19 +01:00
vimc media: vimc: Enable set resolution at the scaler src pad 2021-09-30 10:07:59 +02:00
vivid media: vivid: fix an error code in vivid_create_instance() 2021-10-05 09:39:03 +02:00
Kconfig media: media/test-drivers/Kconfig: fix broken Kconfig 2020-09-12 10:21:01 +02:00
Makefile media: vidtv: implement a tuner driver 2020-09-12 09:42:16 +02:00
vim2m.c media: vim2m: Remove repeated verbose license text 2021-09-30 10:07:55 +02:00