Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 8314375b authored by Francesco Lavra's avatar Francesco Lavra Committed by Greg Kroah-Hartman
Browse files

V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()


commit 19f48cb1 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: default avatarFrancesco Lavra <francescolavra@interfree.it>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9776e39d
No related merge requests found
......@@ -501,6 +501,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
kfree(dev->dvb);
dev->dvb = NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment