Added NULL check code pointed out by Coverity. (via Stanislav

Sedov. Thanks)

Submitted by:   Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer)
Reviewed by:    jeff, kensmith
Approved by:    re (kensmith)
MFC after:      1 week
This commit is contained in:
Daichi GOTO 2007-10-14 13:50:58 +00:00
parent 57821163d3
commit 6c98d0e9db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172640

View File

@ -1450,6 +1450,8 @@ unionfs_readdir(struct vop_readdir_args *ap)
/*
* readdir upper and lower
*/
KASSERT(uvp != NULLVP, ("unionfs_readdir: null upper vp"));
KASSERT(lvp != NULLVP, ("unionfs_readdir: null lower vp"));
if (uio->uio_offset == 0)
unsp->uns_readdir_status = 0;