Skip to content

Commit

Permalink
fix shutdown leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ian.mcgreer%sun.com committed Apr 23, 2002
1 parent 6741700 commit 2cd988f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions security/nss/lib/dev/devslot.c
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions security/nss/lib/dev/devtoken.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2cd988f

Please sign in to comment.