[media] xc5000: use after free in release()

I moved the call to hybrid_tuner_release_state(priv) after
"priv->firmware" dereference.

Fixes: 5264a522a5 ('[media] media: tuner xc5000 - release firmwware from xc5000_release()')

Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Shuah Khan <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Dan Carpenter 2014-09-25 08:40:08 -03:00 • committed by Mauro Carvalho Chehab
commit 4961a5323f

View file

@ -1333,9 +1333,9 @@ static int xc5000_release(struct dvb_frontend *fe)
if (priv) {
cancel_delayed_work(&priv->timer_sleep);
hybrid_tuner_release_state(priv);
if (priv->firmware)
release_firmware(priv->firmware);
hybrid_tuner_release_state(priv);
}
mutex_unlock(&xc5000_list_mutex);