]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: processor: idle: Fix memory leak when register cpuidle device failed
authorHuisong Li <lihuisong@huawei.com>
Mon, 28 Jul 2025 07:06:11 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:26 +0000 (11:56 +0200)
commit8e6846e8208c601d9aa046130f9d98f4bac60847
tree65090793903078a3916c1e175c75a1aa74f05ae1
parentf8c219382234638b8d3288439820ce7cc2bd8e01
ACPI: processor: idle: Fix memory leak when register cpuidle device failed

[ Upstream commit 11b3de1c03fa9f3b5d17e6d48050bc98b3704420 ]

The cpuidle device's memory is leaked when cpuidle device registration
fails in acpi_processor_power_init().  Free it as appropriate.

Fixes: 3d339dcbb56d ("cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://patch.msgid.link/20250728070612.1260859-2-lihuisong@huawei.com
[ rjw: Changed the order of the new statements, added empty line after if () ]
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/processor_idle.c