In unionfs_readdir(), prevent a possible NULL dereference.

CID:		1667
Found by:	Coverity Prevent (tm)
This commit is contained in:
Craig Rodrigues 2006-12-09 16:34:37 +00:00
parent acc4bab11b
commit b16f4eec16

View File

@ -1462,6 +1462,10 @@ unionfs_readdir(struct vop_readdir_args *ap)
uio->uio_offset = 0;
}
if (lvp == NULLVP) {
error = EBADF;
goto unionfs_readdir_exit;
}
/* read lower */
error = VOP_READDIR(lvp, uio, ap->a_cred, ap->a_eofflag,
ap->a_ncookies, ap->a_cookies);