mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:55:40 +01:00
Add missing calls to USE_PSA_DONE
Some functions were not deinitializing the PSA subsystem. This could lead to resource leaks at the level of individual test cases, and possibly at the level of the whole test suite depending on the order and selection of test cases. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
9de97e21fe
commit
1f186ff330
@ -3850,6 +3850,7 @@ void ssl_tls_prf( int type, data_t * secret, data_t * random,
|
||||
exit:
|
||||
|
||||
mbedtls_free( output );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
@ -667,6 +667,7 @@ exit:
|
||||
mbedtls_x509_crt_free( &crt );
|
||||
mbedtls_x509_crt_free( &ca );
|
||||
mbedtls_x509_crl_free( &crl );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -733,6 +734,7 @@ void x509_verify_callback( char *crt_file, char *ca_file, char *name,
|
||||
exit:
|
||||
mbedtls_x509_crt_free( &crt );
|
||||
mbedtls_x509_crt_free( &ca );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -1049,6 +1051,7 @@ void mbedtls_x509_crt_verify_max( char *ca_file, char *chain_dir, int nb_int,
|
||||
exit:
|
||||
mbedtls_x509_crt_free( &chain );
|
||||
mbedtls_x509_crt_free( &trusted );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -1092,6 +1095,7 @@ void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca,
|
||||
exit:
|
||||
mbedtls_x509_crt_free( &trusted );
|
||||
mbedtls_x509_crt_free( &chain );
|
||||
USE_PSA_DONE( );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user