diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_extattr.c | 8 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 1037753..6a63c29 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3711,12 +3711,14 @@ revoke(td, uap) VOP_UNLOCK(vp, 0, td); if (td->td_ucred->cr_uid != vattr.va_uid) { error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL); - if (error) - goto out; + if (error) { + vrele(vp); + return (error); + } } if (vcount(vp) > 1) VOP_REVOKE(vp, REVOKEALL); -out: + vrele(vp); return (error); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1037753..6a63c29 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3711,12 +3711,14 @@ revoke(td, uap) VOP_UNLOCK(vp, 0, td); if (td->td_ucred->cr_uid != vattr.va_uid) { error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL); - if (error) - goto out; + if (error) { + vrele(vp); + return (error); + } } if (vcount(vp) > 1) VOP_REVOKE(vp, REVOKEALL); -out: + vrele(vp); return (error); } |