Skip to content

Commit

Permalink
media: vidtv: Fix memory leak in remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Evgeny Novikov authored and Mauro Carvalho Chehab committed Sep 30, 2021
1 parent 1b03b53 commit 76e21bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/test-drivers/vidtv/vidtv_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 76e21bb

Please sign in to comment.