X86PagingStructuresPAE: Zero fPageDirPointerTable in constructor
... and use it as a guard in the destructor. Fixes crash when running out of memory and Init() is not called.
This commit is contained in:
parent
7d09a8dc67
commit
9a85313bc6
@ -20,6 +20,8 @@
|
||||
|
||||
|
||||
X86PagingStructuresPAE::X86PagingStructuresPAE()
|
||||
:
|
||||
fPageDirPointerTable(NULL)
|
||||
{
|
||||
memset(fVirtualPageDirs, 0, sizeof(fVirtualPageDirs));
|
||||
}
|
||||
@ -32,8 +34,10 @@ X86PagingStructuresPAE::~X86PagingStructuresPAE()
|
||||
// There's one contiguous allocation for 0 and 1.
|
||||
|
||||
// free the PDPT page
|
||||
if (fPageDirPointerTable != NULL) {
|
||||
X86PagingMethodPAE::Method()->Free32BitPage(fPageDirPointerTable,
|
||||
pgdir_phys, fPageDirPointerTableHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user