GIT: unionfs2-2.6.27.y: V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:15 EDT 2010
commit 8314375b8f9447e74221ad2116121ca40cbfc1bb
Author: Francesco Lavra <francescolavra at interfree.it>
Date: Thu Dec 31 08:47:11 2009 -0300
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 at interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index d2b1a1a..72894f4 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -501,6 +501,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}
More information about the unionfs-cvs
mailing list