mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 21:39:54 +00:00
Fix cleanup code
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
3aae30c224
commit
1a45c713f0
@ -311,7 +311,10 @@ static int aead_encrypt( psa_key_id_t key, psa_algorithm_t alg,
|
||||
|
||||
olen = p - out;
|
||||
print_out( "aead ", out, olen );
|
||||
|
||||
exit:
|
||||
/* required on errors, harmless on success */
|
||||
psa_aead_abort( &op );
|
||||
return( status );
|
||||
}
|
||||
|
||||
@ -336,6 +339,8 @@ static psa_status_t aead( const char *info )
|
||||
msg2_part2, sizeof( msg2_part2 ) ) );
|
||||
|
||||
exit:
|
||||
psa_destroy_key( key );
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,7 @@ psa_status_t mac(void)
|
||||
|
||||
exit:
|
||||
psa_mac_abort( &op );
|
||||
psa_destroy_key( key );
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user