aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorDarren Jenkins <darrenrjenkins@gmail.com>2010-02-11 06:07:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:58 -0500
commit96dd6de3d058a454a5bc4ce2f561a053dd90bfae (patch)
treee8f82d9a4febc12102705d3572480eb77a686004 /drivers/media/radio
parent8ef4c21130832cb51d5a5940ad3d4b7140720218 (diff)
V4L/DVB: drivers/media/radio/si470x/radio-si470x-usb.c fix use after free
In si470x_usb_driver_disconnect() radio->disconnect_lock is accessed after it is freed. This fixes the problem. Coverity CID: 2530 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/si470x/radio-si470x-usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
index a0a79c70dd5b..6f60841828da 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -842,9 +842,11 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
842 kfree(radio->int_in_buffer); 842 kfree(radio->int_in_buffer);
843 video_unregister_device(radio->videodev); 843 video_unregister_device(radio->videodev);
844 kfree(radio->buffer); 844 kfree(radio->buffer);
845 mutex_unlock(&radio->disconnect_lock);
845 kfree(radio); 846 kfree(radio);
847 } else {
848 mutex_unlock(&radio->disconnect_lock);
846 } 849 }
847 mutex_unlock(&radio->disconnect_lock);
848} 850}
849 851
850 852