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>
This commit is contained in:
parent
8ef4c21130
commit
96dd6de3d0
|
@ -842,9 +842,11 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
|
||||||
kfree(radio->int_in_buffer);
|
kfree(radio->int_in_buffer);
|
||||||
video_unregister_device(radio->videodev);
|
video_unregister_device(radio->videodev);
|
||||||
kfree(radio->buffer);
|
kfree(radio->buffer);
|
||||||
|
mutex_unlock(&radio->disconnect_lock);
|
||||||
kfree(radio);
|
kfree(radio);
|
||||||
|
} else {
|
||||||
|
mutex_unlock(&radio->disconnect_lock);
|
||||||
}
|
}
|
||||||
mutex_unlock(&radio->disconnect_lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue