1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165034

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);