diff options
author | relyea%netscape.com <devnull@localhost> | 2004-10-11 22:38:44 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2004-10-11 22:38:44 +0000 |
commit | ea25c838dba0f559e6e6a38dacc53e2a6b17c503 (patch) | |
tree | 685421061418798ac26b7227e1deb4a16ff06c96 | |
parent | 58582e99e3113591c99469fa1db9a43623865651 (diff) | |
download | nss-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.c | 5 |
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) { |