From 00ee4cd78a658082ee4a74f4670d66bfc0493b5a Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Tue, 7 Jun 2016 19:08:13 +0000 Subject: [PATCH] Fix a minor leak in ACPI thermal Introduced in r301518. Reported by: Coverity CID: 1356266 Sponsored by: EMC / Isilon Storage Division --- sys/dev/acpica/acpi_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 4fdc800c5f02..fa1c2e81cc23 100644 --- a/sys/dev/acpica/acpi_thermal.c +++ b/sys/dev/acpica/acpi_thermal.c @@ -335,8 +335,10 @@ acpi_tz_startup(void *arg __unused) int devcount, error, i; devclass_get_devices(acpi_tz_devclass, &devs, &devcount); - if (devcount == 0) + if (devcount == 0) { + free(devs, M_TEMP); return; + } /* * Create thread to service all of the thermal zones.