mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
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
This commit is contained in:
@@ -702,9 +702,9 @@ unregister_tzd:
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user