diff mbox

[RFC/RFT,08/14] radio-mr800: fix potential use after free

Message ID 4AB8366E.1010905@gmail.com (mailing list archive)
State RFC
Headers show

Commit Message

David Ellingsworth Sept. 22, 2009, 2:29 a.m. UTC
Version 2

 From c2c100652ed74d91ade7fdfb2a22d607ff43acf2 Mon Sep 17 00:00:00 2001
From: David Ellingsworth <david@identd.dyndns.org>
Date: Mon, 21 Sep 2009 22:17:05 -0400
Subject: [PATCH 08/14] mr800: fix potential use after free

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
---
 drivers/media/radio/radio-mr800.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 /* vidioc_querycap - query device capabilities */
diff mbox

Patch

From c2c100652ed74d91ade7fdfb2a22d607ff43acf2 Mon Sep 17 00:00:00 2001
From: David Ellingsworth <david@identd.dyndns.org>
Date: Mon, 21 Sep 2009 22:17:05 -0400
Subject: [PATCH 08/14] mr800: fix potential use after free

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
---
 drivers/media/radio/radio-mr800.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
index 9fd2342..c8fbdde 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 */
-- 
1.6.4.3