summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2004-10-11 22:38:44 +0000
committerrelyea%netscape.com <devnull@localhost>2004-10-11 22:38:44 +0000
commitea25c838dba0f559e6e6a38dacc53e2a6b17c503 (patch)
tree685421061418798ac26b7227e1deb4a16ff06c96
parent58582e99e3113591c99469fa1db9a43623865651 (diff)
downloadnss-hg-ea25c838dba0f559e6e6a38dacc53e2a6b17c503.tar.gz
Fix regression where PK11_LogoutAll will crash if called when NSS is not initialized.
-rw-r--r--security/nss/lib/pk11wrap/pk11slot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c
index d55bea701..7f1d078d1 100644
--- a/security/nss/lib/pk11wrap/pk11slot.c
+++ b/security/nss/lib/pk11wrap/pk11slot.c
@@ -1256,6 +1256,11 @@ void PK11_LogoutAll(void)
SECMODModuleList *mlp = NULL;
int i;
+ /* NSS is not initialized, there are not tokens to log out */
+ if (lock == NULL) {
+ return;
+ }
+
SECMOD_GetReadLock(lock);
/* find the number of entries */
for (mlp = modList; mlp != NULL; mlp = mlp->next) {