diff options
author | cem <cem@FreeBSD.org> | 2016-06-07 19:08:13 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-06-07 19:08:13 +0000 |
commit | 2f8ff58ccd3d2b91f74e0867d95223c47bff8387 (patch) | |
tree | a8a16f8b911e3afb98e5901b25329e954f231cdc | |
parent | eafe86b137bd00cded58d5fdbae8fa78c34531a0 (diff) | |
download | FreeBSD-src-2f8ff58ccd3d2b91f74e0867d95223c47bff8387.zip FreeBSD-src-2f8ff58ccd3d2b91f74e0867d95223c47bff8387.tar.gz |
Fix a minor leak in ACPI thermal
Introduced in r301518.
Reported by: Coverity
CID: 1356266
Sponsored by: EMC / Isilon Storage Division
-rw-r--r-- | sys/dev/acpica/acpi_thermal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 4fdc800..fa1c2e8 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. |