Detach the AutoLocker before deleting the locked object.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29431 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -346,13 +346,15 @@ Volume::Unmount()
|
||||
status_t error = _Unmount();
|
||||
// free the memory associated with the vnode count map
|
||||
if (fVNodeCountMap) {
|
||||
AutoLocker<VNodeCountMap> _(fVNodeCountMap);
|
||||
AutoLocker<VNodeCountMap> locker(fVNodeCountMap);
|
||||
fVNodeCountingEnabled = false;
|
||||
for (VNodeCountMap::Iterator it = fVNodeCountMap->GetIterator();
|
||||
it.HasNext();) {
|
||||
VNodeCountMap::Entry entry = it.Next();
|
||||
delete entry.value;
|
||||
}
|
||||
|
||||
locker.Detach();
|
||||
delete fVNodeCountMap;
|
||||
fVNodeCountMap = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user