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:
Abdun Nihaal authored and Rafael J. Wysocki committed 2026-07-27 16:58:45 +02:00
1 parent 47d4e945df
commit d5f8e5f604
1 file changed
+1
+1
View File
@@ -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);