lib : kobject: fix refcount imblance on kobject_rename
authorLin Yi <teroincn@163.com>
Mon, 3 Jun 2019 08:08:10 +0000 (16:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2019 17:27:39 +0000 (19:27 +0200)
commit122f8ec7b78e2d0f2dc6c966bef96b47c955ca36
tree43ff22835eb5fbe2d3d137f2d117eb00a7c00928
parent5666d896e838c974c535b3949353c83d68ce4384
lib : kobject: fix refcount imblance on kobject_rename

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

Signed-off-by: Lin Yi <teroincn@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/kobject.c