On MAC check failure for readdir, use 'goto out' to use the common exit

handling, rather than returning directly to prevent leaking of vnode
reference/lock.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-08-15 15:46:10 +00:00
parent 6c62b0477e
commit 6835e7427c

View File

@ -316,7 +316,7 @@ again:
#ifdef MAC
error = mac_check_vnode_readdir(td->td_ucred, vp);
if (error)
return (error);
goto out;
#endif
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag,