mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
fix shutdown leaks
This commit is contained in:
parent
0b0b90f3a9
commit
9221a5bd63
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.6 $ $Date: 2002/04/22 19:08:54 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.7 $ $Date: 2002/04/23 17:22:13 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef NSSCKEPV_H
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.17 $ $Date: 2002/04/22 19:08:55 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.18 $ $Date: 2002/04/23 17:22:13 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef NSSCKEPV_H
|
||||
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user