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.
This commit is contained in:
jhb 2005-04-05 19:39:44 +00:00
parent 44676e4d9e
commit a82d14e9ea

View File

@ -298,12 +298,12 @@ acpi_perf_evaluate(device_t dev)
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;