Skip to content
Commit fe2535a4 authored by Viresh Kumar's avatar Viresh Kumar
Browse files

cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init

It's a classic example of memleak, we allocate something, we fail and
never free the resources.

Make sure we free all resources on policy ->init() failures.

Fixes: a28b2bfc

 ("cppc_cpufreq: replace per-cpu data array with a list")
Tested-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Tested-by: default avatarQian Cai <quic_qiancai@quicinc.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 9357a380
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