summaryrefslogtreecommitdiffstats
path: root/block/blk-iolatency.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-10-31 12:53:06 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-31 17:50:00 +0100
commit4b27d5c420335dad7aea1aa6e799fe1d05c63b7e (patch)
tree9a1af64b77b6a3f9fe643b22473c314b5de47cc9 /block/blk-iolatency.c
parentf4cb34a75e4a4aee09ff832ea2147cf8322a6a7f (diff)
downloadlinux-4b27d5c420335dad7aea1aa6e799fe1d05c63b7e.tar.gz
linux-4b27d5c420335dad7aea1aa6e799fe1d05c63b7e.tar.bz2
linux-4b27d5c420335dad7aea1aa6e799fe1d05c63b7e.zip
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: ec23c1c462de ("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>
Diffstat (limited to 'block/blk-iolatency.c')
0 files changed, 0 insertions, 0 deletions