Commit 3062a987 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'acpi-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix the acpi_thermal_add() error path that may do a double-free in
  some cases after recent changes (Dan Carpenter)"

* tag 'acpi-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: thermal: Fix acpi_thermal_unregister_thermal_zone() cleanup
parents 90b0c2b2 4b27d5c4
......@@ -702,9 +702,9 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
{
thermal_zone_device_disable(tz->thermal_zone);
acpi_thermal_zone_sysfs_remove(tz);
thermal_zone_device_unregister(tz->thermal_zone);
kfree(tz->trip_table);
tz->thermal_zone = NULL;
}
......@@ -967,7 +967,7 @@ static void acpi_thermal_remove(struct acpi_device *device)
flush_workqueue(acpi_thermal_pm_queue);
acpi_thermal_unregister_thermal_zone(tz);
kfree(tz->trip_table);
acpi_thermal_free_thermal_zone(tz);
}
......
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