mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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: Young Xiao <92siuyang@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
0547858b00
commit
6211e44a4d
@ -1147,6 +1147,7 @@ static int dvb_fini(struct cx231xx *dev)
|
||||
|
||||
if (dev->dvb) {
|
||||
unregister_dvb(dev->dvb);
|
||||
kfree(dev->dvb);
|
||||
dev->dvb = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user