Skip to content
Commit 4ab0bb84 authored by Gavin Shan's avatar Gavin Shan Committed by Greg Kroah-Hartman
Browse files

drivers/firmware/psci: Fix memory leakage in alloc_init_cpu_groups()

[ Upstream commit c377e67c

 ]

The CPU mask (@tmp) should be released on failing to allocate
@cpu_groups or any of its elements. Otherwise, it leads to memory
leakage because the CPU mask variable is dynamically allocated
when CONFIG_CPUMASK_OFFSTACK is enabled.

Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20200630075227.199624-1-gshan@redhat.com
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 07904836
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment