In unionfs_readdir(), prevent a possible NULL dereference.
CID: 1667 Found by: Coverity Prevent (tm)
This commit is contained in:
parent
acc4bab11b
commit
b16f4eec16
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user