mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
[media] em28xx: use after free in em28xx_v4l2_close()
We need to move the unlock before the kfree(dev); Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
5359805193
commit
e36c92fd63
@ -2264,9 +2264,9 @@ static int em28xx_v4l2_close(struct file *filp)
|
||||
if (dev->state & DEV_DISCONNECTED) {
|
||||
em28xx_release_resources(dev);
|
||||
kfree(dev->alt_max_pkt_size);
|
||||
mutex_unlock(&dev->lock);
|
||||
kfree(dev);
|
||||
kfree(fh);
|
||||
mutex_unlock(&dev->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user