summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2002-03-12 20:42:09 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2002-03-12 20:42:09 +0000
commitf1a1134d228578859ba63d53fb7c750b4b4a84f3 (patch)
treeedd836eab48a4f554fd27bf1c022b134ce55a3c4 /sys
parent5b869bc71640b862bf003f9eea2fdae1eb935f36 (diff)
Credentials now freed on re-use of dq structure.
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index ab7ff29b562..6381a931d03 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_quota.c,v 1.11 2002/02/22 20:37:46 drahn Exp $ */
+/* $OpenBSD: ufs_quota.c,v 1.12 2002/03/12 20:42:08 csapuntz Exp $ */
/* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */
/*
@@ -890,6 +890,8 @@ dqget(vp, id, ump, type, dqp)
panic("free dquot isn't");
TAILQ_REMOVE(&dqfreelist, dq, dq_freelist);
LIST_REMOVE(dq, dq_hash);
+ crfree(dq->dq_cred);
+ dq->dq_cred = NOCRED;
}
/*
* Initialize the contents of the dquot structure.
@@ -967,8 +969,6 @@ dqrele(vp, dq)
(void) dqsync(vp, dq);
if (--dq->dq_cnt > 0)
return;
- crfree(dq->dq_cred);
- dq->dq_cred = NOCRED;
TAILQ_INSERT_TAIL(&dqfreelist, dq, dq_freelist);
}