Add a sanity check on ucred refcount.
Submitted by: Terry Lambert <terry@lambert.org>
This commit is contained in:
parent
603c86672c
commit
e04670b734
@ -1243,6 +1243,7 @@ crfree(cr)
|
||||
{
|
||||
|
||||
mtx_lock(&cr->cr_mtx);
|
||||
KASSERT(cr->cr_ref > 0, ("bad ucred refcount: %d", cr->cr_ref));
|
||||
if (--cr->cr_ref == 0) {
|
||||
mtx_destroy(&cr->cr_mtx);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user