summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn M. Schanck <jschanck@mozilla.com>2022-02-24 00:21:34 +0000
committerJohn M. Schanck <jschanck@mozilla.com>2022-02-24 00:21:34 +0000
commiteaf74a54a567094e712f3a0ef55d82a01d6554ed (patch)
treea2caed24c4c4810642733509330173cdd3912a76
parent50f462563bee7be5b6ac6835ae052ecbd9eeef8b (diff)
downloadnss-hg-eaf74a54a567094e712f3a0ef55d82a01d6554ed.tar.gz
Bug 1755555 - Hold tokensLock through nssToken_GetSlot calls in nssTrustDomain_GetActiveSlots. r=rrelyeaNSS_3_76_BETA1
Differential Revision: https://phabricator.services.mozilla.com/D138852
-rw-r--r--lib/pki/trustdomain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pki/trustdomain.c b/lib/pki/trustdomain.c
index 84428a1bf..c8f9f1d5b 100644
--- a/lib/pki/trustdomain.c
+++ b/lib/pki/trustdomain.c
@@ -131,7 +131,6 @@ nssTrustDomain_GetActiveSlots(
return NULL;
}
nssList_GetArray(td->tokenList, (void **)tokens, count);
- NSSRWLock_UnlockRead(td->tokensLock);
count = 0;
for (tp = tokens; *tp; tp++) {
NSSSlot *slot = nssToken_GetSlot(*tp);
@@ -141,6 +140,7 @@ nssTrustDomain_GetActiveSlots(
nssSlot_Destroy(slot);
}
}
+ NSSRWLock_UnlockRead(td->tokensLock);
nss_ZFreeIf(tokens);
if (!count) {
nss_ZFreeIf(slots);