mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 03:55:44 +01:00
Fix memory leak in psa_destroy_key
This commit is contained in:
parent
6d9121381a
commit
3c6e970752
@ -385,6 +385,7 @@ psa_status_t psa_destroy_key(psa_key_slot_t key)
|
||||
slot->type == PSA_KEY_TYPE_RSA_KEYPAIR )
|
||||
{
|
||||
mbedtls_rsa_free( slot->data.rsa );
|
||||
mbedtls_free( slot->data.rsa );
|
||||
}
|
||||
else
|
||||
#endif /* defined(MBEDTLS_RSA_C) */
|
||||
@ -392,6 +393,7 @@ psa_status_t psa_destroy_key(psa_key_slot_t key)
|
||||
if( PSA_KEY_TYPE_IS_ECC( slot->type ) )
|
||||
{
|
||||
mbedtls_ecp_keypair_free( slot->data.ecp );
|
||||
mbedtls_free( slot->data.ecp );
|
||||
}
|
||||
else
|
||||
#endif /* defined(MBEDTLS_ECP_C) */
|
||||
|
Loading…
Reference in New Issue
Block a user