X86PagingStructuresPAE: clear fVirtualPageDirs in constructor
... not just the first element. Fixes a crash in X86VMTranslationMapPAE destructor when running out of memory when initializing the map.
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
X86PagingStructuresPAE::X86PagingStructuresPAE()
|
X86PagingStructuresPAE::X86PagingStructuresPAE()
|
||||||
{
|
{
|
||||||
fVirtualPageDirs[0] = NULL;
|
memset(fVirtualPageDirs, 0, sizeof(fVirtualPageDirs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -29,6 +29,7 @@ X86PagingStructuresPAE::~X86PagingStructuresPAE()
|
|||||||
{
|
{
|
||||||
// free the user page dirs
|
// free the user page dirs
|
||||||
free(fVirtualPageDirs[0]);
|
free(fVirtualPageDirs[0]);
|
||||||
|
// There's one contiguous allocation for 0 and 1.
|
||||||
|
|
||||||
// free the PDPT page
|
// free the PDPT page
|
||||||
X86PagingMethodPAE::Method()->Free32BitPage(fPageDirPointerTable,
|
X86PagingMethodPAE::Method()->Free32BitPage(fPageDirPointerTable,
|
||||||
|
|||||||
Reference in New Issue
Block a user