mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #6419 from mpg/fix-assert-alloc-usage
Fix usage of ASSERT_ALLOC()
This commit is contained in:
@ -779,7 +779,7 @@ void free_named_data_list( int length )
|
|||||||
for( i = 0; i < length; i++ )
|
for( i = 0; i < length; i++ )
|
||||||
{
|
{
|
||||||
mbedtls_asn1_named_data *new = NULL;
|
mbedtls_asn1_named_data *new = NULL;
|
||||||
ASSERT_ALLOC( new, sizeof( mbedtls_asn1_named_data ) );
|
ASSERT_ALLOC( new, 1 );
|
||||||
new->next = head;
|
new->next = head;
|
||||||
head = new;
|
head = new;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void init_handshake_options( handshake_test_options *opts )
|
|||||||
opts->resize_buffers = 1;
|
opts->resize_buffers = 1;
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||||
opts->cache = NULL;
|
opts->cache = NULL;
|
||||||
ASSERT_ALLOC( opts->cache, sizeof( mbedtls_ssl_cache_context ) );
|
ASSERT_ALLOC( opts->cache, 1 );
|
||||||
mbedtls_ssl_cache_init( opts->cache );
|
mbedtls_ssl_cache_init( opts->cache );
|
||||||
exit:
|
exit:
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user