提交 6b74705e 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: Beceem: use after free in bcm_exit()

We can't call class_destroy() until after the driver has been deregistered.
It leads to a NULL deref on module unload.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 cd0b0ebf
......@@ -658,9 +658,8 @@ static __init int bcm_init(void)
static __exit void bcm_exit(void)
{
class_destroy(bcm_class);
usb_deregister(&usbbcm_driver);
class_destroy(bcm_class);
}
module_init(bcm_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册