summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremaldona%redhat.com <devnull@localhost>2012-01-13 17:11:12 +0000
committeremaldona%redhat.com <devnull@localhost>2012-01-13 17:11:12 +0000
commitb066b2bca0f4b0723c5ae41eda3312e5ac6be5fc (patch)
tree1aaaa73342153bbc9a613abd934c817dfa9f360c
parent85b5319d2ecb6c45f3203cd5ab43c9afe8e4dd59 (diff)
downloadnss-hg-b066b2bca0f4b0723c5ae41eda3312e5ac6be5fc.tar.gz
Bug 715666 - premature unloading of softoken crashes libcurl, contributed by Kamil Dudka, r=rrelyea
-rw-r--r--security/nss/lib/pk11wrap/pk11load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/nss/lib/pk11wrap/pk11load.c b/security/nss/lib/pk11wrap/pk11load.c
index a0d899d5b..97cd1cc02 100644
--- a/security/nss/lib/pk11wrap/pk11load.c
+++ b/security/nss/lib/pk11wrap/pk11load.c
@@ -592,7 +592,7 @@ SECMOD_UnloadModule(SECMODModule *mod) {
/* do we want the semantics to allow unloading the internal library?
* if not, we should change this to SECFailure and move it above the
* mod->loaded = PR_FALSE; */
- if (mod->internal) {
+ if (mod->internal && (mod->dllName == NULL)) {
if (0 == PR_ATOMIC_DECREMENT(&softokenLoadCount)) {
if (softokenLib) {
disableUnload = PR_GetEnv("NSS_DISABLE_UNLOAD");