зеркало из https://github.com/mozilla/pjs.git
Bug 391903: nssSlot object for nssckbi leaked when loaded by PSM.
r=rrelyea
This commit is contained in:
Родитель
463abfd4c2
Коммит
f7ad359b14
|
@ -35,7 +35,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.45 $ $Date: 2008-04-23 16:37:19 $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.46 $ $Date: 2008-04-27 02:13:52 $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef NSSCKEPV_H
|
||||
|
@ -70,6 +70,10 @@ nssToken_Destroy (
|
|||
if (PR_AtomicDecrement(&tok->base.refCount) == 0) {
|
||||
PZ_DestroyLock(tok->base.lock);
|
||||
nssTokenObjectCache_Destroy(tok->cache);
|
||||
/* The token holds the first/last reference to the slot.
|
||||
* When the token is actually destroyed, that ref must go too.
|
||||
*/
|
||||
(void)nssSlot_Destroy(tok->slot);
|
||||
return nssArena_Destroy(tok->base.arena);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.56 $ $Date: 2007-11-16 18:57:54 $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.57 $ $Date: 2008-04-27 02:13:47 $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef DEV_H
|
||||
|
@ -101,8 +101,10 @@ static void
|
|||
token_destructor(void *t)
|
||||
{
|
||||
NSSToken *tok = (NSSToken *)t;
|
||||
/* in 3.4, also destroy the slot (managed separately) */
|
||||
(void)nssSlot_Destroy(tok->slot);
|
||||
/* The token holds the first/last reference to the slot.
|
||||
* When the token is actually destroyed (ref count == 0),
|
||||
* the slot will also be destroyed.
|
||||
*/
|
||||
nssToken_Destroy(tok);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче