Dan Carpenter
4b27d5c420
ACPI: thermal: Fix acpi_thermal_unregister_thermal_zone() cleanup
...
The acpi_thermal_unregister_thermal_zone() is paired with
acpi_thermal_register_thermal_zone() so it should mirror it. It should
clean up all the resources that the register function allocated and
leave the stuff that was allocated elsewhere.
Unfortunately, it doesn't call thermal_zone_device_disable(). Also it
calls kfree(tz->trip_table) when it shouldn't. That was allocated in
acpi_thermal_add(). Putting the kfree() here leads to a double free
in the acpi_thermal_add() clean up function.
Likewise, the acpi_thermal_remove() should mirror acpi_thermal_add() so
it should have an explicit kfree(tz->trip_table) as well.
Fixes: ec23c1c462 ("ACPI: thermal: Use trip point table to register thermal zones")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com >
2023-10-31 17:50:00 +01:00
..
2023-07-10 18:49:16 +02:00
2023-10-24 20:50:17 +02:00
2023-09-01 09:53:54 -07:00
2022-09-28 17:26:25 +02:00
2023-10-26 15:04:49 +02:00
2023-02-10 17:33:34 -08:00
2023-01-30 16:47:13 +01:00
2023-06-01 08:45:04 -07:00
2023-10-26 14:59:52 +02:00
2023-10-17 15:43:30 +02:00
2023-03-20 18:04:58 +01:00
2023-08-17 20:01:24 +02:00
2021-07-16 19:20:28 +02:00
2020-11-17 18:12:34 +01:00
2023-08-17 19:44:22 +02:00
2023-06-12 19:28:20 +02:00
2023-10-03 21:12:22 +02:00
2022-03-25 18:01:40 +01:00
2023-03-22 20:25:18 +01:00
2023-10-26 14:55:04 +02:00
2023-08-21 13:37:48 -07:00
2023-10-24 20:54:29 +02:00
2022-11-23 19:06:56 +01:00
2023-07-04 19:28:20 +02:00
2023-01-17 12:52:11 +01:00
2023-10-11 14:27:37 +02:00
2023-08-17 20:01:24 +02:00
2023-10-06 17:32:51 +02:00
2020-11-17 18:06:29 +01:00
2023-10-06 17:32:51 +02:00
2022-04-22 16:55:33 +02:00
2021-06-07 15:36:45 +02:00
2023-10-26 15:04:49 +02:00
2023-06-26 17:20:28 +02:00
2022-06-20 20:33:05 +02:00
2023-03-17 19:06:23 +01:00
2021-04-28 19:17:54 +02:00
2020-09-25 18:25:51 +02:00
2023-01-13 15:56:10 -06:00
2023-10-26 14:59:52 +02:00
2021-12-17 18:45:51 +01:00
2021-12-01 20:19:30 +01:00
2023-10-24 21:53:14 +02:00
2021-06-29 15:51:25 +02:00
2020-11-09 19:25:20 +01:00
2022-12-06 12:44:14 +01:00
2022-11-23 19:31:57 +01:00
2022-05-25 15:37:07 +02:00
2023-01-10 20:23:48 +01:00
2023-10-06 17:32:51 +02:00
2023-08-25 20:49:52 +02:00
2022-12-30 19:12:30 +01:00
2023-10-18 13:11:04 +02:00
2023-08-22 10:39:26 +02:00
2023-08-01 13:59:25 +02:00
2021-06-29 15:51:25 +02:00
2023-09-21 20:55:43 +02:00
2023-10-03 20:26:21 +02:00
2022-11-26 12:57:18 +00:00
2022-07-27 21:21:27 +02:00
2022-07-14 15:25:36 -05:00
2023-10-03 15:46:14 +02:00
2020-09-25 18:25:51 +02:00
2023-02-09 16:51:39 -08:00
2022-12-12 18:29:54 -08:00
2021-08-16 18:32:02 +02:00
2023-04-27 18:44:43 +02:00
2023-03-14 20:34:38 +01:00
2023-10-03 21:24:10 +02:00
2022-01-22 08:33:37 +02:00
2023-08-17 18:39:28 +02:00
2023-03-22 15:20:38 +01:00
2023-10-04 16:31:27 +01:00
2023-09-18 12:16:16 +02:00
2022-12-30 19:10:02 +01:00
2023-03-22 15:20:38 +01:00
2022-10-28 19:02:45 +02:00
2023-10-03 15:57:05 +02:00
2021-06-07 15:36:46 +02:00
2023-10-26 12:27:36 +02:00
2023-03-30 19:01:05 +02:00
2022-11-23 19:11:22 +01:00
2020-11-09 19:08:06 +01:00
2023-10-26 14:55:04 +02:00
2023-06-26 16:54:10 +02:00
2022-09-09 17:37:40 +02:00
2023-03-27 20:50:28 +02:00
2023-03-27 20:43:58 +02:00
2023-06-01 08:44:59 -07:00
2023-10-31 17:50:00 +01:00
2023-06-16 19:48:09 +02:00
2023-10-26 14:59:52 +02:00
2023-10-03 20:33:58 +02:00
2023-03-30 19:20:42 +02:00
2020-11-09 19:08:06 +01:00