Skip to content
Commit e6be18f6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Wolfram Sang
Browse files

i2c: dev: use after free in detach



The call to put_i2c_dev() frees "i2c_dev" so there is a use after
free when we call cdev_del(&i2c_dev->cdev).

Fixes: d6760b14 ('i2c: dev: switch from register_chrdev to cdev API')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent ed2608fa
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