summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/pki
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
commitfc61780b35af913801d72086456f493f63197da6 (patch)
treef85891288a7bd988da9f0f15ae64e5c63f00d493 /security/nss/lib/pki
parent69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff)
parent50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff)
downloadUXP-2018.07.18.tar
UXP-2018.07.18.tar.gz
UXP-2018.07.18.tar.lz
UXP-2018.07.18.tar.xz
UXP-2018.07.18.zip
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts: # browser/app/profile/firefox.js # browser/components/preferences/jar.mn
Diffstat (limited to 'security/nss/lib/pki')
-rw-r--r--security/nss/lib/pki/pki3hack.c4
-rw-r--r--security/nss/lib/pki/pkibase.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/security/nss/lib/pki/pki3hack.c b/security/nss/lib/pki/pki3hack.c
index 548853970..fb3110a23 100644
--- a/security/nss/lib/pki/pki3hack.c
+++ b/security/nss/lib/pki/pki3hack.c
@@ -180,16 +180,18 @@ STAN_RemoveModuleFromDefaultTrustDomain(
NSSTrustDomain *td;
int i;
td = STAN_GetDefaultTrustDomain();
- NSSRWLock_LockWrite(td->tokensLock);
for (i = 0; i < module->slotCount; i++) {
token = PK11Slot_GetNSSToken(module->slots[i]);
if (token) {
nssToken_NotifyCertsNotVisible(token);
+ NSSRWLock_LockWrite(td->tokensLock);
nssList_Remove(td->tokenList, token);
+ NSSRWLock_UnlockWrite(td->tokensLock);
PK11Slot_SetNSSToken(module->slots[i], NULL);
nssToken_Destroy(token);
}
}
+ NSSRWLock_LockWrite(td->tokensLock);
nssListIterator_Destroy(td->tokens);
td->tokens = nssList_CreateIterator(td->tokenList);
NSSRWLock_UnlockWrite(td->tokensLock);
diff --git a/security/nss/lib/pki/pkibase.c b/security/nss/lib/pki/pkibase.c
index 4082a37bd..f58a262cf 100644
--- a/security/nss/lib/pki/pkibase.c
+++ b/security/nss/lib/pki/pkibase.c
@@ -923,9 +923,11 @@ nssPKIObjectCollection_AddInstanceAsObject(
return PR_FAILURE;
}
if (!node->haveObject) {
+ nssPKIObject *original = node->object;
node->object = (*collection->createObject)(node->object);
if (!node->object) {
/*remove bogus object from list*/
+ nssPKIObject_Destroy(original);
nssPKIObjectCollection_RemoveNode(collection, node);
return PR_FAILURE;
}