提交 96dd6de3 编写于 作者: D Darren Jenkins 提交者: 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: NDarren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册