Fixed a possible KDL; the inode might be NULL.
* This happens in case the inode could not be opened in the first place.
This commit is contained in:
@@ -2052,8 +2052,10 @@ BlockAllocator::_FreeIndices()
|
|||||||
{
|
{
|
||||||
for (int32 i = 0; i < fCheckCookie->indices.CountItems(); i++) {
|
for (int32 i = 0; i < fCheckCookie->indices.CountItems(); i++) {
|
||||||
check_index* index = fCheckCookie->indices.Array()[i];
|
check_index* index = fCheckCookie->indices.Array()[i];
|
||||||
put_vnode(fVolume->FSVolume(),
|
if (index->inode != NULL) {
|
||||||
fVolume->ToVnode(index->inode->BlockRun()));
|
put_vnode(fVolume->FSVolume(),
|
||||||
|
fVolume->ToVnode(index->inode->BlockRun()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fCheckCookie->indices.MakeEmpty();
|
fCheckCookie->indices.MakeEmpty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user