mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
fix core when token list is emptied (caused by switch to fips mode)
This commit is contained in:
parent
4fc4b9ceba
commit
f3392f0b6a
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: list.c,v $ $Revision: 1.11 $ $Date: 2002/01/08 15:37:33 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: list.c,v $ $Revision: 1.12 $ $Date: 2002/01/23 17:39:27 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
@ -86,6 +86,9 @@ nsslist_get_matching_element(nssList *list, void *data)
|
||||
PRCList *link;
|
||||
nssListElement *node;
|
||||
node = list->head;
|
||||
if (!node) {
|
||||
return NULL;
|
||||
}
|
||||
link = &node->link;
|
||||
while (node) {
|
||||
/* using a callback slows things down when it's just compare ... */
|
||||
@ -276,7 +279,9 @@ nssList_Remove(nssList *list, void *data)
|
||||
}
|
||||
PR_REMOVE_LINK(&node->link);
|
||||
nss_ZFreeIf(node);
|
||||
--list->count;
|
||||
if (--list->count == 0) {
|
||||
list->head = NULL;
|
||||
}
|
||||
}
|
||||
NSSLIST_UNLOCK_IF(list);
|
||||
return PR_SUCCESS;
|
||||
|
@ -323,7 +323,6 @@ SECMOD_DeleteInternalModule(char *name) {
|
||||
SECMOD_DestroyModule(oldModule);
|
||||
SECMOD_DeletePermDB(mlp->module);
|
||||
SECMOD_DestroyModuleListElement(mlp);
|
||||
rv = STAN_AddModuleToDefaultTrustDomain(internalModule);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user