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: NYufen Yu <yuyufen@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录