Commit 78b17ed0 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Fix leak in powernow-k8

Spotted by Yury Umanets
parent d75801fd
......@@ -736,7 +736,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
/* verify only 1 entry from the lo frequency table */
if ((fid < HI_FID_TABLE_BOTTOM) && (cntlofreq++)) {
printk(KERN_ERR PFX "Too many lo freq table entries\n");
goto err_out;
goto err_out_mem;
}
if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) {
......@@ -757,6 +757,10 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
print_basics(data);
powernow_k8_acpi_pst_values(data, 0);
return 0;
err_out_mem:
kfree(powernow_table);
err_out:
acpi_processor_unregister_performance(&data->acpi_data, data->cpu);
......
Markdown is supported
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