test_suite_ssl: prefer ASSERT_ALLOC over malloc
Fix formatting for option initialization Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
2e1a232261
commit
3d0d501517
1 changed files with 33 additions and 31 deletions
|
@ -122,8 +122,10 @@ void init_handshake_options( handshake_test_options *opts )
|
|||
opts->cli_log_fun = NULL;
|
||||
opts->resize_buffers = 1;
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
opts->cache = malloc( sizeof( mbedtls_ssl_cache_context ) );
|
||||
ASSERT_ALLOC( opts->cache, sizeof( mbedtls_ssl_cache_context ) );
|
||||
mbedtls_ssl_cache_init( opts->cache );
|
||||
exit:
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -131,7 +133,7 @@ void free_handshake_options( handshake_test_options *opts )
|
|||
{
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
mbedtls_ssl_cache_free( opts->cache );
|
||||
free( opts->cache );
|
||||
mbedtls_free( opts->cache );
|
||||
#else
|
||||
(void) opts;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue