summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-01-24 22:43:47 +0000
committerJohannes Stezenbach <devnull@localhost>2005-01-24 22:43:47 +0000
commit62fa5afaabfd4a3b65fd95ed59e3781830a8403e (patch)
tree06a1948e34d0a2c5cfd0a29fd6cfe4594411c66a /linux/drivers/media
parent3569e234dd89bedeaa00e3a4ea8db2f0c5135210 (diff)
downloadmediapointer-dvb-s2-62fa5afaabfd4a3b65fd95ed59e3781830a8403e.tar.gz
mediapointer-dvb-s2-62fa5afaabfd4a3b65fd95ed59e3781830a8403e.tar.bz2
patch by Gerd Knorr: fix access to freed memory when unloading frontend drivers
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 85790c0cf..60c888eb2 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -907,8 +907,9 @@ int dvb_unregister_frontend(struct dvb_frontend* fe)
fe->ops->release(fe);
else
printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops->info.name);
- if (fe->frontend_priv)
- kfree(fe->frontend_priv);
+ /* fe is invalid now */
+ if (fepriv)
+ kfree(fepriv);
up (&frontend_mutex);
return 0;
}