summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2024-05-29 14:34:32 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-12 11:11:42 +0200
commit47c310fbaaf40a72e35e3b027033b15f6c0cc9f0 (patch)
treeba0b4ba028881b52ad1e3b5f6ab35bd8ff2153aa /arch
parent6bf77014db580905fa0be1df262f029965289726 (diff)
ACPI: processor: Fix memory leaks in error paths of processor_add()
[ Upstream commit 47ec9b417ed9b6b8ec2a941cd84d9de62adc358a ] If acpi_processor_get_info() returned an error, pr and the associated pr->throttling.shared_cpu_map were leaked. The unwind code was in the wrong order wrt to setup, relying on some unwind actions having no affect (clearing variables that were never set etc). That makes it harder to reason about so reorder and add appropriate labels to only undo what was actually set up in the first place. Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20240529133446.28446-6-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions