svn commit: r301562 - head/sys/dev/acpica

Conrad E. Meyer cem at FreeBSD.org
Tue Jun 7 19:08:15 UTC 2016


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.


More information about the svn-src-head mailing list