ACPI: thermal: Fix a small leak in acpi_thermal_add()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 27 Sep 2023 12:37:26 +0000 (15:37 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Sep 2023 12:58:14 +0000 (14:58 +0200)
commit0d9741abd1c583e7bedb178358a9abd0981f49ba
tree3ee8c1902e911be7f94eb610feb8bf370b582aad
parent058f5e407deb8d21b0a04e50e8efbd25b1fcbd1b
ACPI: thermal: Fix a small leak in acpi_thermal_add()

Free "tz" if the "trip" allocation fails.

Fixes: 5fc2189f9335 ("ACPI: thermal: Create and populate trip points table earlier")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/thermal.c