diff --git a/tf-psa-crypto/tests/suites/test_suite_psa_crypto_op_fail.function b/tf-psa-crypto/tests/suites/test_suite_psa_crypto_op_fail.function index d0f5a80eb2..c7b6844442 100644 --- a/tf-psa-crypto/tests/suites/test_suite_psa_crypto_op_fail.function +++ b/tf-psa-crypto/tests/suites/test_suite_psa_crypto_op_fail.function @@ -223,12 +223,9 @@ void sign_fail(int key_type_arg, data_t *key_data, size_t length = SIZE_MAX; psa_sign_hash_interruptible_operation_t sign_operation = psa_sign_hash_interruptible_operation_init(); - psa_verify_hash_interruptible_operation_t verify_operation = psa_verify_hash_interruptible_operation_init(); - - PSA_INIT(); psa_set_key_type(&attributes, key_type); @@ -277,6 +274,8 @@ void sign_fail(int key_type_arg, data_t *key_data, } exit: + psa_sign_hash_abort(&sign_operation); + psa_verify_hash_abort(&verify_operation); psa_destroy_key(key_id); psa_reset_key_attributes(&attributes); PSA_DONE();