bdi: fix memleak in bdi_register_va()
hulk inclusion
category: bugfix
bugzilla: 30109
CVE: NA
---------------------------
When device_add() fail, we just free rcu_dev and
forget kobj->name. Using put_devcie to free both
of rcu_dev and kobj->name.
Fixes: 5ca4579ae59b ("bdi: fix use-after-free for the bdi device")
Signed-off-by:
Yufen Yu <yuyufen@huawei.com>
Reviewed-by:
Hou Tao <houtao1@huawei.com>
Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment