Fix memory leak when using hardware acceleraters.

This commit is contained in:
relyea%netscape.com 2000-06-29 21:26:17 +00:00
Родитель 41437958c8
Коммит 87fe02ed53
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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;
}