]> git.baikalelectronics.ru Git - kernel.git/commit
[media] videodev: fix a NULL pointer dereference in v4l2_device_release()
authorAntonio Ospite <ospite@studenti.unina.it>
Wed, 12 Oct 2011 20:59:26 +0000 (17:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Oct 2011 11:48:08 +0000 (09:48 -0200)
commit35da44363e1c5fb19739edece087128114fedb33
tree7db4aac4f1380e15a8c0442e74634db99ef39636
parent78426c61c60045fd7113846a0280960338868cb5
[media] videodev: fix a NULL pointer dereference in v4l2_device_release()

The change in f5c9bac does not cover the case when v4l2_dev is already
NULL, fix that.

With a Kinect sensor, seen as an USB camera using GSPCA in this context,
a NULL pointer dereference BUG can be triggered by just unplugging the
device after the camera driver has been loaded.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-dev.c