diff mbox

[PATCH/RFC,2/7] dsbr100: fix potential use after free

Message ID 1273079130-21999-3-git-send-email-david@identd.dyndns.org (mailing list archive)
State Superseded
Headers show

Commit Message

David Ellingsworth May 5, 2010, 5:05 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 673eda8..2f96e13 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -354,8 +354,8 @@  static void usb_dsbr100_disconnect(struct usb_interface *intf)
 	radio->removed = 1;
 	mutex_unlock(&radio->lock);
 
-	video_unregister_device(&radio->videodev);
 	v4l2_device_disconnect(&radio->v4l2_dev);
+	video_unregister_device(&radio->videodev);
 }