mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-28 06:19:27 +00:00
Add missing resource cleanup on test failure
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
eafc2751e6
commit
27c604af08
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user