diff options
author | phk <phk@FreeBSD.org> | 2004-11-16 08:22:06 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-16 08:22:06 +0000 |
commit | 79449e034133e4446253c9d18f09f5f008fcf22f (patch) | |
tree | 9da0d2ddd8e18aa490916b08cca1572514c432c2 /sys | |
parent | b3f08741db7927b28bdcfcb361406e4f5e206f04 (diff) | |
download | FreeBSD-src-79449e034133e4446253c9d18f09f5f008fcf22f.zip FreeBSD-src-79449e034133e4446253c9d18f09f5f008fcf22f.tar.gz |
Eliminate pointless goto.
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); } |