summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Lavra <francescolavra@interfree.it>2009-12-31 08:47:11 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:55:58 -0700
commit4940b4acdfa806dba2115902632b7eb9c0c1b5fd (patch)
tree3c374ec5687375b9bafa03ace25edd887ab52bd1
parentb2f2bf429aa7da6e0c06f38f44583690f1c4dce3 (diff)
downloadlinux-stable-4940b4acdfa806dba2115902632b7eb9c0c1b5fd.tar.gz
linux-stable-4940b4acdfa806dba2115902632b7eb9c0c1b5fd.tar.bz2
linux-stable-4940b4acdfa806dba2115902632b7eb9c0c1b5fd.zip
V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c1
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 d603575431b4..ec1d212f7e3a 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -591,6 +591,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}