diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/nss/lib/pk11wrap/pk11skey.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index e48c88a6d..4d65b15a8 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -2780,13 +2780,17 @@ pk11_AnyUnwrapKey(PK11SlotInfo *slot, CK_OBJECT_HANDLE wrappingKey, symKey = pk11_HandUnwrap(slot, wrappingKey, &mechanism, wrappedKey, target, keyTemplate, templateCount, keySize, wincx); - if (symKey) return symKey; + if (symKey) { + if (param_free) SECITEM_FreeItem(param_free,PR_TRUE); + return symKey; + } /* fall through, maybe they incorrectly set CKF_DECRYPT */ } /* get our key Structure */ symKey = PK11_CreateSymKey(slot,target,wincx); if (symKey == NULL) { + if (param_free) SECITEM_FreeItem(param_free,PR_TRUE); return NULL; } |