Fix cleanup in crypto_tester if a crypter fails
This commit is contained in:
@@ -265,7 +265,10 @@ METHOD(crypto_tester_t, test_crypter, bool,
|
|||||||
failure:
|
failure:
|
||||||
crypter->destroy(crypter);
|
crypter->destroy(crypter);
|
||||||
chunk_free(&cipher);
|
chunk_free(&cipher);
|
||||||
chunk_free(&plain);
|
if (plain.ptr != vector->plain)
|
||||||
|
{
|
||||||
|
chunk_free(&plain);
|
||||||
|
}
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1(DBG_LIB, "disabled %N[%s]: %s test vector failed",
|
DBG1(DBG_LIB, "disabled %N[%s]: %s test vector failed",
|
||||||
|
|||||||
Reference in New Issue
Block a user