projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5359805
)
[media] em28xx: use after free in em28xx_v4l2_close()
author
Dan Carpenter
<
[email protected]
>
Tue, 14 Aug 2012 05:58:15 +0000
(
02:58
-0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Wed, 15 Aug 2012 21:49:00 +0000
(18:49 -0300)
We need to move the unlock before the kfree(dev);
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/usb/em28xx/em28xx-video.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/em28xx/em28xx-video.c
b/drivers/media/usb/em28xx/em28xx-video.c
index ecb23df7f16efb178cd735cbc147cef1ae7b75c6..78d6ebd712b9135f5a8e121175d1bef4b514103d 100644
(file)
--- a/
drivers/media/usb/em28xx/em28xx-video.c
+++ b/
drivers/media/usb/em28xx/em28xx-video.c
@@
-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;
}