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

This commit is contained in:
Nate Lawson 2003-09-04 15:55:41 +00:00
parent eec804bbb8
commit f97739da4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119739

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);
}