cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit()
authorPan Xinhui <xinhuix.pan@intel.com>
Mon, 20 Jul 2015 06:24:36 +0000 (14:24 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Jul 2015 20:27:40 +0000 (22:27 +0200)
freq_table should be alloced in ->init and freed in ->exit, but it
it is not freed.  Fix this memory leak in acpi_cpufreq_cpu_exit().

Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/ia64-acpi-cpufreq.c

index cab8ab6..0202429 100644 (file)
@@ -333,6 +333,7 @@ acpi_cpufreq_cpu_exit (
        if (data) {
                acpi_io_data[policy->cpu] = NULL;
                acpi_processor_unregister_performance(policy->cpu);
+               kfree(policy->freq_table);
                kfree(data);
        }