ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.

ACPI_FREE() should always be used to free objects allocated with
ACPI_ALLOCATE_ZEROED(), so make acpi_ut_create_package_object() do
that.

This patch ports a fix from ACPICA upstream to Linux and helps to
reduce source code differences between them.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Lv Zheng 2013-10-31 09:30:42 +08:00 committed by Rafael J. Wysocki
parent 130797a6c3
commit bd48d67767
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)
package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count +
1) * sizeof(void *));
if (!package_elements) {
acpi_ut_remove_reference(package_desc);
ACPI_FREE(package_desc);
return_PTR(NULL);
}