diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-09-14 08:21:25 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-10-19 08:08:19 +0100 |
commit | 112024a3b6dcfc62ec36ea0cf58b897f2ce54c59 (patch) | |
tree | e312ca26b8a4a90ae9530875e00cb5264b793f2a /drivers/media/i2c | |
parent | fe47b6d7582ad1a608d8341c3e02c3e06f5678e6 (diff) |
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: 76e21bb8be4f ("media: vidtv: Fix memory leak in remove")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
0 files changed, 0 insertions, 0 deletions