Commit 6211e44a authored by Young Xiao's avatar Young Xiao Committed by Mauro Carvalho Chehab

media: cx231xx-dvb: fix memory leak in dvb_fini()

In dvb_init(), dev->dvb is allocated by kzalloc.
Therefore, it must be freed being set to NULL.
Signed-off-by: default avatarYoung Xiao <92siuyang@gmail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 0547858b
......@@ -1147,6 +1147,7 @@ static int dvb_fini(struct cx231xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
kfree(dev->dvb);
dev->dvb = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment