Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Apr 2005 10:36:55 -0700
From:      Nate Lawson <nate@root.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/acpica acpi_perf.c
Message-ID:  <42556FB7.5080407@root.org>
In-Reply-To: <20050405193951.7930016A527@hub.freebsd.org>
References:  <20050405193951.7930016A527@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42556FB7.5080407>