Don't free the buffer if it wasn't actually allocated.

This commit is contained in:
njl 2003-09-04 15:55:41 +00:00
parent df4c8d05a8
commit 9c26b457bc

View File

@ -1232,8 +1232,8 @@ acpi_EvaluateInteger(ACPI_HANDLE handle, char *path, int *number)
status = AcpiEvaluateObject(handle, path, NULL, &buf);
if (ACPI_SUCCESS(status))
status = acpi_ConvertBufferToInteger(&buf, number);
AcpiOsFree(buf.Pointer);
}
AcpiOsFree(buf.Pointer);
}
return (status);
}