My last commit broken vm_clone_area(): it didn't grab a reference to its

cache, and therefore, let the kernel crash easily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-22 00:04:28 +00:00
parent db39fa281e
commit c1b5724035

View File

@ -1228,6 +1228,8 @@ vm_clone_area(team_id team, const char *name, void **address, uint32 addressSpec
address, sourceArea->cache_offset, sourceArea->size, addressSpec,
sourceArea->wiring, protection, mapping, &newArea, name);
}
if (status == B_OK)
vm_cache_acquire_ref(sourceArea->cache_ref);
vm_put_area(sourceArea);
vm_put_address_space(addressSpace);