зеркало из https://github.com/mozilla/pjs.git
fix shutdown leaks
This commit is contained in:
Родитель
15b28d747c
Коммит
9d9366f6db
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче