diff -r ef2a444a7410 -r b3a1d9898418 kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp --- a/kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp Mon May 03 13:47:38 2010 +0300 +++ b/kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp Fri May 14 17:13:29 2010 +0300 @@ -245,14 +245,14 @@ { TRACE(("DAddressSpace::FreeVirtualMemory(0x%08x,0x%08x) osAsid=%d",aAddr, aSize, iOsAsid)); Lock(); - if(iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize)) + TBool global = iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize); + if(global) UserGlobalVirtualAllocator.Free(aAddr,aSize); else - { iVirtualAllocator.Free(aAddr,aSize); + Unlock(); + if (!global) AsyncClose(); - } - Unlock(); }