summaryrefslogtreecommitdiff
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
authorJonathan Mini <mini@FreeBSD.org>2002-07-11 02:18:33 +0000
committerJonathan Mini <mini@FreeBSD.org>2002-07-11 02:18:33 +0000
commitaaa1c7715b0c71a795100722f5e1815b6f37bbaa (patch)
tree998c964f1dba7a37a9c8f3efc2c0d6275c26d219 /sys/kern/kern_prot.c
parent74496412c4481b1a4df43cdd5f5faa5b11a400f2 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 3ddd2862d64a..8f8580385fd4 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1765,6 +1765,19 @@ crdup(struct ucred *cr)
return (newcr);
}
+#ifdef DIAGNOSTIC
+void
+cred_free_thread(struct thread *td)
+{
+ struct ucred *cred;
+
+ cred = td->td_ucred;
+ td->td_ucred = NULL;
+ if (cred != NULL)
+ crfree(cred);
+}
+#endif
+
/*
* Fill in a struct xucred based on a struct ucred.
*/