mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 10:53:15 +00:00
Check if MmHeapAlloc() failed.
svn path=/trunk/; revision=44972
This commit is contained in:
parent
4b9333f4a1
commit
a71c3f0d12
|
@ -68,7 +68,7 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
|||
LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE;
|
||||
|
||||
/* Get BIOS memory map */
|
||||
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
||||
RtlZeroMemory(BiosMemoryMap, sizeof(BiosMemoryMap));
|
||||
BiosMemoryMapEntryCount = PcMemGetMemoryMap(BiosMemoryMap,
|
||||
sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP));
|
||||
|
||||
|
@ -79,6 +79,14 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
|
|||
/* Set 'Configuration Data' value */
|
||||
PartialResourceList =
|
||||
MmHeapAlloc(sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize);
|
||||
|
||||
if (PartialResourceList == NULL)
|
||||
{
|
||||
DPRINTM(DPRINT_HWDETECT,
|
||||
"Failed to allocate resource descriptor\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize);
|
||||
PartialResourceList->Version = 0;
|
||||
PartialResourceList->Revision = 0;
|
||||
|
|
Loading…
Reference in a new issue