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:
rwatson 2005-03-01 08:56:13 +00:00
parent 2955be3b94
commit a19cae397f

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