From owner-svn-src-head@freebsd.org Tue Jun 7 19:08:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 187D4B6ED69; Tue, 7 Jun 2016 19:08:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD7041E6B; Tue, 7 Jun 2016 19:08:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u57J8EkX011735; Tue, 7 Jun 2016 19:08:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u57J8EZI011734; Tue, 7 Jun 2016 19:08:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201606071908.u57J8EZI011734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 7 Jun 2016 19:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301562 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2016 19:08:15 -0000 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.