- NtFreeVirtualMemory: Pass RegionListHead from SectionData vice VirtualMemoryData to MmAlterRegion

for MemoryArea->Type of Section view. Fixes MapViewOfFile tests for kernel32_winetests.
  More investigation is needed on whether this function should even succeed on FileMapping Objects.

svn path=/trunk/; revision=40833
This commit is contained in:
Michael Martin 2009-05-08 07:13:41 +00:00
parent 8e4c1cabb7
commit c02e2cb416

View file

@ -1003,7 +1003,9 @@ NtFreeVirtualMemory(IN HANDLE ProcessHandle,
Status =
MmAlterRegion(AddressSpace,
MemoryArea->StartingAddress,
&MemoryArea->Data.VirtualMemoryData.RegionListHead,
(MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) ?
&MemoryArea->Data.SectionData.RegionListHead :
&MemoryArea->Data.VirtualMemoryData.RegionListHead,
BaseAddress,
RegionSize,
MEM_RESERVE,