Fixed problem with handles not being released
[reactos.git] / reactos / ntoskrnl / mm / marea.c
index fd77ab3..fb096eb 100644 (file)
@@ -438,7 +438,7 @@ NTSTATUS MmFreeMemoryArea(PEPROCESS Process,
          {
             PhysicalAddr = MmGetPhysicalAddress(MemoryArea->BaseAddress + 
                                                 (i*PAGESIZE));
-             MmFreePage((PVOID)(ULONG)(PhysicalAddr.u.LowPart), 1);
+             MmDereferencePage((PVOID)(ULONG)(PhysicalAddr.u.LowPart));
          }
      }
    for (i=0; i<=(MemoryArea->Length/PAGESIZE); i++)