Skip to content

Commit

Permalink
additional fix for the patch from bug 126087. Must not set symKey->sl…
Browse files Browse the repository at this point in the history
…ot to NULL after leaving the freelist lock, or somebody else might pick up the symKey from the freelist, have their slot NULL'ed, and whamo..
  • Loading branch information
ian.mcgreer%sun.com committed Apr 11, 2002
1 parent ae7fa7d commit b94b26f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/nss/lib/pk11wrap/pk11skey.c
Expand Up @@ -268,9 +268,9 @@ PK11_FreeSymKey(PK11SymKey *symKey)
PK11_USE_THREADS(PZ_Lock(slot->freeListLock);)
symKey->next = slot->freeSymKeysHead;
slot->freeSymKeysHead = symKey;
symKey->slot = NULL;
PK11_USE_THREADS(PZ_Unlock(slot->freeListLock);)
PR_AtomicIncrement(&slot->keyCount);
symKey->slot = NULL;
freeit = PR_FALSE;
}
if (freeit) {
Expand Down

0 comments on commit b94b26f

Please sign in to comment.