*****************************************************************************/
/*
- * Copyright (C) 2000 - 2016, Intel Corp.
+ * Copyright (C) 2000 - 2017, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
ACPI_MEMORY_LIST *Cache;
- Cache = AcpiOsAllocate (sizeof (ACPI_MEMORY_LIST));
+ Cache = AcpiOsAllocateZeroed (sizeof (ACPI_MEMORY_LIST));
if (!Cache)
{
return (AE_NO_MEMORY);
}
- memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));
-
Cache->ListName = ListName;
Cache->ObjectSize = ObjectSize;
return_VOID;
}
+ if (!AcpiGbl_GlobalList)
+ {
+ goto Exit;
+ }
+
Element = AcpiGbl_GlobalList->ListHead;
while (Element)
{
if (Element->Size < sizeof (ACPI_COMMON_DESCRIPTOR))
{
- AcpiOsPrintf ("%p Length 0x%04X %9.9s-%u "
+ AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u "
"[Not a Descriptor - too small]\n",
Descriptor, Element->Size, Element->Module,
Element->Line);
if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) !=
ACPI_DESC_TYPE_CACHED)
{
- AcpiOsPrintf ("%p Length 0x%04X %9.9s-%u [%s] ",
+ AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u [%s] ",
Descriptor, Element->Size, Element->Module,
Element->Line, AcpiUtGetDescriptorName (Descriptor));
Element = Element->Next;
}
+Exit:
(void) AcpiUtReleaseMutex (ACPI_MTX_MEMORY);
/* Print summary */