diff options
author | Taras Kondratiuk <taras.kondratiuk@linaro.org> | 2015-02-27 00:56:35 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-02-27 12:04:11 +0300 |
commit | a3a87d4eba8e27a68630eacfbe91d9d767ea1255 (patch) | |
tree | 185a986dfa15bb54b275abc6ac9cf825cf0a0bdb /test | |
parent | 31533eb9cac3a141865a5f9c897f6e4320c96665 (diff) |
validation: crypto: destroy session in case of failure
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/validation/crypto/odp_crypto_test_async_inp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c index aff93dabd..9e4e9f149 100644 --- a/test/validation/crypto/odp_crypto_test_async_inp.c +++ b/test/validation/crypto/odp_crypto_test_async_inp.c @@ -92,8 +92,8 @@ static void alg_test(enum odp_crypto_op op, rc = odp_crypto_operation(&op_params, &posted, NULL); if (rc < 0) { - odp_packet_free(pkt); - CU_FAIL_FATAL("Failed odp_crypto_operation()"); + CU_FAIL("Failed odp_crypto_operation()"); + goto cleanup; } CU_ASSERT(posted); @@ -112,7 +112,7 @@ static void alg_test(enum odp_crypto_op op, CU_ASSERT(!memcmp(data_addr, output_vec, output_vec_len)); CU_ASSERT(result.ctx == (void *)0xdeadbeef); - +cleanup: rc = odp_crypto_session_destroy(session); CU_ASSERT(!rc); |