kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
--- a/kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp	Wed Sep 01 12:34:56 2010 +0100
@@ -245,14 +245,14 @@
 	{
 	TRACE(("DAddressSpace::FreeVirtualMemory(0x%08x,0x%08x) osAsid=%d",aAddr, aSize, iOsAsid));
 	Lock();
-	TBool global = iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize);
-	if(global)
+	if(iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize))
 		UserGlobalVirtualAllocator.Free(aAddr,aSize);
 	else
+		{
 		iVirtualAllocator.Free(aAddr,aSize);
+		AsyncClose();
+		}
 	Unlock();
-	if (!global)
-		AsyncClose();
 	}