summaryrefslogtreecommitdiff
path: root/security/nss
diff options
context:
space:
mode:
authorian.mcgreer%sun.com <devnull@localhost>2002-04-23 17:22:13 +0000
committerian.mcgreer%sun.com <devnull@localhost>2002-04-23 17:22:13 +0000
commit6b0171dd4600f1bcee5193bf2227fdf2d20434ef (patch)
treecd51ff17705d7f181ae4b48e21b366d141811c48 /security/nss
parent8ed1f118c8827ac56934dcba5f6a798cd84a420b (diff)
downloadnss-hg-6b0171dd4600f1bcee5193bf2227fdf2d20434ef.tar.gz
fix shutdown leaks
Diffstat (limited to 'security/nss')
-rw-r--r--security/nss/lib/dev/devslot.c5
-rw-r--r--security/nss/lib/dev/devtoken.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/security/nss/lib/dev/devslot.c b/security/nss/lib/dev/devslot.c
index 30f4855c3..843a5bd4b 100644
--- a/security/nss/lib/dev/devslot.c
+++ b/security/nss/lib/dev/devslot.c
@@ -176,16 +176,17 @@ nssSlot_Destroy
NSSSlot *slot
)
{
-#ifdef PURE_STAN_BUILD
if (slot) {
PR_AtomicDecrement(&slot->base.refCount);
if (slot->base.refCount == 0) {
+ PZ_DestroyLock(slot->base.lock);
+#ifdef PURE_STAN_BUILD
nssToken_Destroy(slot->token);
nssModule_DestroyFromSlot(slot->module, slot);
+#endif
return nssArena_Destroy(slot->base.arena);
}
}
-#endif
return PR_SUCCESS;
}
diff --git a/security/nss/lib/dev/devtoken.c b/security/nss/lib/dev/devtoken.c
index 6fde75de3..9064fd719 100644
--- a/security/nss/lib/dev/devtoken.c
+++ b/security/nss/lib/dev/devtoken.c
@@ -153,6 +153,7 @@ nssToken_Destroy
if (tok) {
PR_AtomicDecrement(&tok->base.refCount);
if (tok->base.refCount == 0) {
+ PZ_DestroyLock(tok->base.lock);
nssTokenObjectCache_Destroy(tok->cache);
return nssArena_Destroy(tok->base.arena);
}