diff options
author | Myron Stowe <myron.stowe@hp.com> | 2007-06-04 18:25:37 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-06-18 00:51:47 -0400 |
commit | 83dd4504456d4b5e464d6ec4a7665e2c922db67f (patch) | |
tree | 9886cee43e943e85b267d0ae394ed72ded17ca2e /drivers | |
parent | e7c746ef098770f863ba294adac5b30d124ba469 (diff) |
ACPICA: fix error path in new external package objects as method arguments
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index db0b9bac794..76ee766c84f 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -177,7 +177,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count) | |||
177 | package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) | 177 | package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) |
178 | (count + 1) * sizeof(void *)); | 178 | (count + 1) * sizeof(void *)); |
179 | if (!package_elements) { | 179 | if (!package_elements) { |
180 | ACPI_FREE(package_desc); | 180 | acpi_ut_remove_reference(package_desc); |
181 | return_PTR(NULL); | 181 | return_PTR(NULL); |
182 | } | 182 | } |
183 | 183 | ||