Author: cem
Date: Tue Jun  7 19:08:13 2016
New Revision: 301562
URL: https://svnweb.freebsd.org/changeset/base/301562

Log:
  Fix a minor leak in ACPI thermal
  
  Introduced in r301518.
  
  Reported by:  Coverity
  CID:          1356266
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/acpica/acpi_thermal.c

Modified: head/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- head/sys/dev/acpica/acpi_thermal.c  Tue Jun  7 18:50:36 2016        
(r301561)
+++ head/sys/dev/acpica/acpi_thermal.c  Tue Jun  7 19:08:13 2016        
(r301562)
@@ -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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to