mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
Bugzilla bug 135821: fixed the internal slot reference leak in
PK11_WrapPrivKey. r=relyea.
This commit is contained in:
parent
a4133875e0
commit
a8cdaf3aca
@ -4758,8 +4758,11 @@ PK11_WrapPrivKey(PK11SlotInfo *slot, PK11SymKey *wrappingKey,
|
||||
|
||||
privSlot = int_slot; /* The private key has a new home */
|
||||
newPrivKey = pk11_loadPrivKey(privSlot,privKey,NULL,PR_FALSE,PR_FALSE);
|
||||
/* newPrivKey has allocated its own reference to the slot, so it's
|
||||
* safe until we destroy newPrivkey.
|
||||
*/
|
||||
PK11_FreeSlot(int_slot);
|
||||
if (newPrivKey == NULL) {
|
||||
PK11_FreeSlot (int_slot);
|
||||
return SECFailure;
|
||||
}
|
||||
privKey = newPrivKey;
|
||||
|
Loading…
x
Reference in New Issue
Block a user