media: vidtv: Fix memory leak in remove

vidtv_bridge_remove() releases and cleans up everything except for dvb
itself. The patch adds this missed release.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Evgeny Novikov 2021-05-27 11:26:24 +02:00 committed by Mauro Carvalho Chehab
parent 1b03b539e6
commit 76e21bb8be

View File

@ -557,6 +557,7 @@ static int vidtv_bridge_remove(struct platform_device *pdev)
dvb_dmxdev_release(&dvb->dmx_dev);
dvb_dmx_release(&dvb->demux);
dvb_unregister_adapter(&dvb->adapter);
kfree(dvb);
dev_info(&pdev->dev, "Successfully removed vidtv\n");
return 0;