Commit 960ac933 authored by Lin Yi's avatar Lin Yi Committed by Yang Yingliang
Browse files

lib : kobject: fix refcount imblance on kobject_rename



mainline inclusion
from mainline-v5.3-rc1
commit 122f8ec7
category: bugfix
bugzilla: 18462
CVE: NA

-------------------------------------------------

the kobj refcount increased by kobject_get should be released before
error return, otherwise lead to a memory leak.

Signed-off-by: default avatarLin Yi <teroincn@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLi Heng <liheng40@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4b50cb05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment