diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index f3b30dedaed..6dcf764d7a1 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -4620,7 +4620,7 @@ MmRosFlushVirtualMemory( if (Entry != 0) { /* This will write the page to disk, if needed */ - MmCheckDirtySegment(Segment, &SegmentOffset, MmIsDirtyPage(Process, CurrentAddress), FALSE); + MmCheckDirtySegment(Segment, &SegmentOffset, Process ? MmIsDirtyPage(Process, CurrentAddress) : FALSE, FALSE); Iosb->Information += PAGE_SIZE; } SegmentOffset.QuadPart += PAGE_SIZE; @@ -4694,7 +4694,10 @@ MmCheckDirtySegment( /* Drop the reference we got */ Entry = MAKE_SSE(Page << PAGE_SHIFT, SHARE_COUNT_FROM_SSE(Entry) - 1); - if (DirtyAgain) Entry = DIRTY_SSE(Entry); + if (DirtyAgain) + { + Entry = DIRTY_SSE(Entry); + } MmSetPageEntrySectionSegment(Segment, Offset, Entry); }