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:
Axel Dörfler
2012-03-31 14:25:43 +02:00
parent 439495d8d4
commit 97b80db250
@@ -2052,8 +2052,10 @@ BlockAllocator::_FreeIndices()
{
for (int32 i = 0; i < fCheckCookie->indices.CountItems(); i++) {
check_index* index = fCheckCookie->indices.Array()[i];
put_vnode(fVolume->FSVolume(),
fVolume->ToVnode(index->inode->BlockRun()));
if (index->inode != NULL) {
put_vnode(fVolume->FSVolume(),
fVolume->ToVnode(index->inode->BlockRun()));
}
}
fCheckCookie->indices.MakeEmpty();
}