mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
cpufreq: powernow-k8: Fix possible memory leak in powernowk8_cpu_init()
The memory allocated for data->powernow_table inside
powernow_k8_cpu_init_acpi() or find_psb_table() is not freed in one of
the error paths in powernowk8_cpu_init(). Fix that by adding a kfree().
Fixes: 1ff6e97f1d ("[CPUFREQ] cpumask: avoid playing with cpus_allowed in powernow-k8.c")
Cc: [email protected]
Signed-off-by: Abdun Nihaal <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Reviewed-by: Zhongqiu Han <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
1 parent
47d4e945df
commit
d5f8e5f604
1 file changed
+1
@@ -1084,6 +1084,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
|
||||
|
||||
err_out_exit_acpi:
|
||||
powernow_k8_cpu_exit_acpi(data);
|
||||
kfree(data->powernow_table);
|
||||
|
||||
err_out:
|
||||
kfree(data);
|
||||
|
||||
Reference in new issue
Block a user