From: Johannes Stezenbach - core: fix access to freed memory when unloading frontend drivers (fix by Gerd Knorr) Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton --- 25-akpm/drivers/media/dvb/dvb-core/dvb_frontend.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN drivers/media/dvb/dvb-core/dvb_frontend.c~dvb-fix-access-to-freed-memory drivers/media/dvb/dvb-core/dvb_frontend.c --- 25/drivers/media/dvb/dvb-core/dvb_frontend.c~dvb-fix-access-to-freed-memory 2005-01-25 21:19:26.222965216 -0800 +++ 25-akpm/drivers/media/dvb/dvb-core/dvb_frontend.c 2005-01-25 21:19:26.226964608 -0800 @@ -912,8 +912,9 @@ int dvb_unregister_frontend(struct dvb_f 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; } _