From: David Ellingsworth Date: Wed, 23 Sep 2009 21:03:52 +0000 (-0300) Subject: V4L/DVB (13067): radio-mr800: fix potential use after free X-Git-Tag: v2.6.33-rc1~338^2~324 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4e3616576e9e65d53f9381b9f334257299c7262e;p=karo-tx-linux.git V4L/DVB (13067): radio-mr800: fix potential use after free Fix portential use after free. Signed-off-by: David Ellingsworth Acked-by: Alexey Klimov Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index c4f4cd8dbb6c..dbae50ba250c 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c @@ -273,8 +273,8 @@ static void usb_amradio_disconnect(struct usb_interface *intf) mutex_unlock(&radio->lock); usb_set_intfdata(intf, NULL); - video_unregister_device(&radio->videodev); v4l2_device_disconnect(&radio->v4l2_dev); + video_unregister_device(&radio->videodev); } /* vidioc_querycap - query device capabilities */