Commit 96dd6de3 authored by Darren Jenkins's avatar Darren Jenkins Committed by Mauro Carvalho Chehab

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: default avatarDarren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8ef4c211
......@@ -842,9 +842,11 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
kfree(radio->int_in_buffer);
video_unregister_device(radio->videodev);
kfree(radio->buffer);
mutex_unlock(&radio->disconnect_lock);
kfree(radio);
} else {
mutex_unlock(&radio->disconnect_lock);
}
mutex_unlock(&radio->disconnect_lock);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment