]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
media: stk-webcam: Fix use after free on disconnect
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 22 Sep 2017 13:48:41 +0000 (09:48 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Dec 2017 15:06:46 +0000 (10:06 -0500)
commit6e298d58473520a806d59b7aa51dcb194d1a1b03
tree6a76dff03c1d938926aa62a7e9b65a7ce324ea38
parentc0f71bbb810237a38734607ca4599632f7f5d47f
media: stk-webcam: Fix use after free on disconnect

We free the stk_camera device too early.  It's allocate first in probe
and it should be freed last in stk_camera_disconnect().

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/stkwebcam/stk-webcam.c