import changes from mozilla nss repo:

- Bug 1682863 - Revert nssSlot_IsTokenPresent to 3.58 after ongoing Fx hangs with slow PKCS11 devices. r=bbeurdouche
- Bug 1680400 - Fix memory leak in PK11_UnwrapPrivKey. r=bbeurdouche
This commit is contained in:
roytam1 2020-12-30 08:33:37 +08:00
commit c082741e8a
2 changed files with 12 additions and 36 deletions

View file

@ -1320,23 +1320,23 @@ PK11_UnwrapPrivKey(PK11SlotInfo *slot, PK11SymKey *wrappingKey,
NULL, perm, sensitive);
SECKEY_DestroyPrivateKey(privKey);
PK11_FreeSlot(int_slot);
SECITEM_FreeItem(param_free, PR_TRUE);
return newPrivKey;
}
}
if (int_slot)
PK11_FreeSlot(int_slot);
PORT_SetError(PK11_MapError(crv));
SECITEM_FreeItem(param_free, PR_TRUE);
return NULL;
}
SECITEM_FreeItem(param_free, PR_TRUE);
return PK11_MakePrivKey(slot, nullKey, PR_FALSE, privKeyID, wincx);
loser:
if (newKey) {
PK11_FreeSymKey(newKey);
}
if (ck_id) {
SECITEM_FreeItem(ck_id, PR_TRUE);
}
PK11_FreeSymKey(newKey);
SECITEM_FreeItem(ck_id, PR_TRUE);
SECITEM_FreeItem(param_free, PR_TRUE);
return NULL;
}