Skip to content

Commit

Permalink
ACPICA: fix error path in new external package objects as method argu…
Browse files Browse the repository at this point in the history
…ments

In the routine acpi_ut_create_package_object(), if the
ACPI_ALLOCATE_ZEROED() fails then ACPI_FREE(package_desc) is called as
part of the cleanup.  This should instead be
acpi_ut_remove_reference(package_desc) in order to remove the reference
acquired from acpi_ut_create_internal_object() [see the routine
acpi_ut_create_buffer_object() as an example of proper functionality].

Signed-off-by: Myron Stowe <myron.stowe@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Myron Stowe authored and Len Brown committed Jun 18, 2007
1 parent e7c746e commit 83dd450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/utilities/utobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,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_FREE(package_desc);
acpi_ut_remove_reference(package_desc);
return_PTR(NULL);
}

Expand Down

0 comments on commit 83dd450

Please sign in to comment.