diff options
author | Francesco Lavra <francescolavra@interfree.it> | 2009-12-31 08:47:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:10:34 -0300 |
commit | 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c (patch) | |
tree | 0d46d2a4e9ae6a6568642f0d95cd46c05d1be56f /drivers/media/video/em28xx | |
parent | be39515758f382e8b1d0d0012cd59008e9970dec (diff) |
V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index cc0505eb900..6b0a4953ab0 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c @@ -606,6 +606,7 @@ static int dvb_fini(struct em28xx *dev) if (dev->dvb) { unregister_dvb(dev->dvb); + kfree(dev->dvb); dev->dvb = NULL; } |