diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-10-31 02:30:42 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-31 14:37:33 +0100 |
commit | bd48d677670bb35548718a1fd54c2c114a449973 (patch) | |
tree | e653428c9ef84d9f63531a79a55e8ac18ff30e43 /drivers/acpi/acpica/utobject.c | |
parent | ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size(). (diff) | |
download | linux-bd48d677670bb35548718a1fd54c2c114a449973.tar.xz linux-bd48d677670bb35548718a1fd54c2c114a449973.zip |
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>
Diffstat (limited to 'drivers/acpi/acpica/utobject.c')
-rw-r--r-- | drivers/acpi/acpica/utobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c index cddb0ef5b9b7..d2a7b6123743 100644 --- a/drivers/acpi/acpica/utobject.c +++ b/drivers/acpi/acpica/utobject.c @@ -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); } |