From 5ba58aa606c9fa0848ae200c06299cefce4deedf Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 18 Nov 2010 19:20:38 +0000 Subject: [PATCH] [NTOSKRNL] - Initialize the Zero variable - Don't corrupt the Color value in case we didn't have any page on MmZeroedPageListHead. - Fixes boot. svn path=/trunk/; revision=49614 --- reactos/ntoskrnl/mm/ARM3/pfnlist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/pfnlist.c b/reactos/ntoskrnl/mm/ARM3/pfnlist.c index 9c2f5bdbe18..575c179a33d 100644 --- a/reactos/ntoskrnl/mm/ARM3/pfnlist.c +++ b/reactos/ntoskrnl/mm/ARM3/pfnlist.c @@ -407,7 +407,7 @@ MiRemoveZeroPage(IN ULONG Color) { PFN_NUMBER PageIndex; PMMPFN Pfn1; - BOOLEAN Zero; + BOOLEAN Zero = FALSE; /* Make sure PFN lock is held and we have pages */ ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); @@ -421,7 +421,6 @@ MiRemoveZeroPage(IN ULONG Color) /* Check the zero list */ ASSERT_LIST_INVARIANT(&MmZeroedPageListHead); PageIndex = MmZeroedPageListHead.Flink; - Color = PageIndex & MmSecondaryColorMask; if (PageIndex == LIST_HEAD) { /* This means there's no zero pages, we have to look for free ones */ @@ -444,6 +443,10 @@ MiRemoveZeroPage(IN ULONG Color) } } } + else + { + Color = PageIndex & MmSecondaryColorMask; + } } /* Sanity checks */ -- 2.17.1