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();
|
status_t error = _Unmount();
|
||||||
// free the memory associated with the vnode count map
|
// free the memory associated with the vnode count map
|
||||||
if (fVNodeCountMap) {
|
if (fVNodeCountMap) {
|
||||||
AutoLocker<VNodeCountMap> _(fVNodeCountMap);
|
AutoLocker<VNodeCountMap> locker(fVNodeCountMap);
|
||||||
fVNodeCountingEnabled = false;
|
fVNodeCountingEnabled = false;
|
||||||
for (VNodeCountMap::Iterator it = fVNodeCountMap->GetIterator();
|
for (VNodeCountMap::Iterator it = fVNodeCountMap->GetIterator();
|
||||||
it.HasNext();) {
|
it.HasNext();) {
|
||||||
VNodeCountMap::Entry entry = it.Next();
|
VNodeCountMap::Entry entry = it.Next();
|
||||||
delete entry.value;
|
delete entry.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
locker.Detach();
|
||||||
delete fVNodeCountMap;
|
delete fVNodeCountMap;
|
||||||
fVNodeCountMap = NULL;
|
fVNodeCountMap = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user