Don't access the area after deleting it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35340 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-01-30 08:23:37 +00:00
parent 545ebde00c
commit 0e81d474e7

View File

@ -1296,8 +1296,9 @@ MemoryManager::_FreeArea(Area* area, bool areaRemoved, uint32 flags)
dprintf("slab memory manager: deleting area %p (%" B_PRId32 ")\n", area,
area->vmArea->id);
size_t memoryToUnreserve = area->reserved_memory_for_mapping;
delete_area(area->vmArea->id);
vm_unreserve_memory(area->reserved_memory_for_mapping);
vm_unreserve_memory(memoryToUnreserve);
mutex_lock(&sLock);
}