When mac_check_system_acct() fails, make sure to unlock as well as close

the vnode.

Pointed out by:	jeff
This commit is contained in:
Robert Watson 2005-03-01 08:56:13 +00:00
parent 21a69c81c0
commit 081322613b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142889

View File

@ -152,6 +152,7 @@ acct(td, uap)
#ifdef MAC
error = mac_check_system_acct(td->td_ucred, nd.ni_vp);
if (error) {
VOP_UNLOCK(nd.ni_vp, 0, td);
vn_close(nd.ni_vp, flags, td->td_ucred, td);
goto done2;
}