]> www.infradead.org Git - users/dwmw2/linux.git/commit
cpuidle: Fix three reference count leaks
authorQiushi Wu <wu000273@umn.edu>
Thu, 28 May 2020 18:20:46 +0000 (13:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:52 +0000 (09:32 +0200)
commit7f89678e9a1c5926f6aef5896febf63dd85d2736
tree50d834e930d6094ff5b67f4515fdb8c7e6389b27
parent79335eecef7c66a9f77b92a3e8da9bebeb0bca0f
cpuidle: Fix three reference count leaks

[ Upstream commit c343bf1ba5efcbf2266a1fe3baefec9cc82f867f ]

kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object.

Previous commit "b8eb718348b8" fixed a similar problem.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpuidle/sysfs.c