From: Evgeny Novikov Date: Thu, 27 May 2021 09:26:24 +0000 (+0200) Subject: media: vidtv: Fix memory leak in remove X-Git-Tag: v6.1-rc5~2566^2~179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76e21bb8be4f5f987f3006d197196fe6af63f656;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index 7561770..0f6d998 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -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;