diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-10-26 20:34:38 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-10-26 20:34:38 +0000 |
commit | 2508be43cbd383ab0ffdf4aa96310bf394659f50 (patch) | |
tree | 659aeb64d0208de2a4114fe92e126b9a736d0b2a /sys/kern | |
parent | 919bd25fe85856b40334bde8867c443ce833b7bd (diff) |
Now that threads hold their own reference to their ucreds, sys_ktrace()
doesn't need to hold an extra reference during the call
ok deraadt@ millert@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_ktrace.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 7c3f1d4762d..c0865c6562e 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.69 2014/07/13 15:46:21 uebayasi Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.70 2014/10/26 20:34:37 guenther Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -423,7 +423,6 @@ sys_ktrace(struct proc *curp, void *v, register_t *retval) * an operation which requires a file argument. */ cred = curp->p_ucred; - crhold(cred); NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, fname), curp); if ((error = vn_open(&nd, FREAD|FWRITE|O_NOFOLLOW, 0)) != 0) @@ -500,8 +499,6 @@ sys_ktrace(struct proc *curp, void *v, register_t *retval) done: if (vp != NULL) (void) vn_close(vp, FREAD|FWRITE, cred, curp); - if (cred != NULL) - crfree(cred); return (error); } |