Added missing safety check when reading in a node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13864 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -264,6 +264,10 @@ bfs_read_vnode(void *_ns, vnode_id id, void **_node, bool reenter)
|
|||||||
|
|
||||||
CachedBlock cached(volume, id);
|
CachedBlock cached(volume, id);
|
||||||
bfs_inode *node = (bfs_inode *)cached.Block();
|
bfs_inode *node = (bfs_inode *)cached.Block();
|
||||||
|
if (node == NULL) {
|
||||||
|
FATAL(("could not read inode: %Ld\n", id));
|
||||||
|
return B_IO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
status_t status = node->InitCheck(volume);
|
status_t status = node->InitCheck(volume);
|
||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user