diff options
author | Young Xiao <92siuyang@gmail.com> | 2019-05-28 08:38:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-05-29 12:58:36 -0400 |
commit | 6211e44a4dfc2a12c5d40984ab876537bf0d0830 (patch) | |
tree | 1a75daf8496784aa681fa480e395af0d0cf6372a | |
parent | 0547858b00bf2e895ee7c6ede7b376450e217171 (diff) | |
download | linux-6211e44a4dfc2a12c5d40984ab876537bf0d0830.tar.gz linux-6211e44a4dfc2a12c5d40984ab876537bf0d0830.tar.bz2 linux-6211e44a4dfc2a12c5d40984ab876537bf0d0830.zip |
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>
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 8fbb9523c88d..e205f7f0a56a 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -1147,6 +1147,7 @@ static int dvb_fini(struct cx231xx *dev) if (dev->dvb) { unregister_dvb(dev->dvb); + kfree(dev->dvb); dev->dvb = NULL; } |