From owner-cvs-all@FreeBSD.ORG Thu Apr 7 17:36:56 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAE6F16A4CE; Thu, 7 Apr 2005 17:36:56 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7295F43D46; Thu, 7 Apr 2005 17:36:56 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j37HatLS008417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 7 Apr 2005 10:36:55 -0700 Message-ID: <42556FB7.5080407@root.org> Date: Thu, 07 Apr 2005 10:36:55 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <20050405193951.7930016A527@hub.freebsd.org> In-Reply-To: <20050405193951.7930016A527@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/acpica acpi_perf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2005 17:36:57 -0000 John Baldwin wrote: > jhb 2005-04-05 19:39:44 UTC > > FreeBSD src repository > > Modified files: > sys/dev/acpica acpi_perf.c > Log: > Don't free the _PSS buffer until after we check to see if we have no valid > states as otherwise we will try to free the buffer twice. > > Revision Changes Path > 1.19 +2 -2 src/sys/dev/acpica/acpi_perf.c > > > Index: src/sys/dev/acpica/acpi_perf.c > diff -u src/sys/dev/acpica/acpi_perf.c:1.18 src/sys/dev/acpica/acpi_perf.c:1.19 > --- src/sys/dev/acpica/acpi_perf.c:1.18 Sun Mar 27 22:38:28 2005 > +++ src/sys/dev/acpica/acpi_perf.c Tue Apr 5 19:39:44 2005 > @@ -298,12 +298,12 @@ > > count++; > } > - AcpiOsFree(buf.Pointer); > - sc->px_count = count; > > /* No valid Px state found. */ > if (count == 0) > goto out; > + AcpiOsFree(buf.Pointer); > + sc->px_count = count; > > /* Get the control and status registers (one of each). */ > buf.Pointer = NULL; Well, thanks for fixing the free but the count change was incorrect. We set it to the full package size and need to always reset it, even if the result will be 0. -- Nate