Skip to content

Commit f4661af

Browse files
authored
Merge pull request #677 from dcoombs/develop
Fix memory leak in SoftHSM::UnwrapKeySym.
2 parents 8224ebe + fbca80b commit f4661af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/SoftHSM.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6831,9 +6831,10 @@ CK_RV SoftHSM::UnwrapKeySym
68316831
rv = CKR_OK;
68326832
if (!cipher->unwrapKey(unwrappingkey, mode, wrapped, keydata))
68336833
rv = CKR_GENERAL_ERROR;
6834-
cipher->recycleKey(unwrappingkey);
6835-
CryptoFactory::i()->recycleSymmetricAlgorithm(cipher);
68366834
}
6835+
6836+
cipher->recycleKey(unwrappingkey);
6837+
CryptoFactory::i()->recycleSymmetricAlgorithm(cipher);
68376838
return rv;
68386839
}
68396840

0 commit comments

Comments
 (0)