* Timo Kreuzer: Fix a NULL pointer dereference. CID 13453.

svn path=/trunk/; revision=54487
This commit is contained in:
Amine Khaldi 2011-11-24 11:25:40 +00:00
parent d96e0b80cf
commit 4696a40648

View file

@ -747,19 +747,22 @@ HalpAcpiTableCacheInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
/* Use HAL heap */
HalpUnmapVirtualAddress(MappedAddress, TableLength);
LoaderExtension = LoaderBlock->Extension;
}
else
{
/* Use Mm */
MmUnmapIoSpace(MappedAddress, TableLength << PAGE_SHIFT);
LoaderExtension = NULL;
}
/* Cache the RSDT */
HalpAcpiCacheTable(&Rsdt->Header);
/* Check for compatible loader block extension */
LoaderExtension = LoaderBlock->Extension;
if (LoaderExtension->Size >= 0x58)
if (LoaderExtension && (LoaderExtension->Size >= 0x58))
{
/* Compatible loader: did it provide an ACPI table override? */
if ((LoaderExtension->AcpiTable) && (LoaderExtension->AcpiTableSize))