Add a sanity check on ucred refcount.

Submitted by: Terry Lambert <terry@lambert.org>
This commit is contained in:
Alfred Perlstein 2001-04-17 20:50:43 +00:00
parent 603c86672c
commit e04670b734

View File

@ -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);
/*