Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[sfrench/cifs-2.6.git] / drivers / acpi / utilities / utobject.c
index db0b9bac7945f7bd55b55a0561b37104630ca23b..e08b3fa6639f593c0c1d4c893d591be26d36243c 100644 (file)
@@ -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);
        }
 
@@ -432,7 +432,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
         * element -- which is legal)
         */
        if (!internal_object) {
-               *obj_length = 0;
+               *obj_length = sizeof(union acpi_object);
                return_ACPI_STATUS(AE_OK);
        }