Commit 836d0ba3 authored by Yufen Yu's avatar Yufen Yu Committed by Yang Yingliang
Browse files

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: default avatarYufen Yu <yuyufen@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 90ba118b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment