mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Merge 'development' into development
This commit is contained in:
@@ -67,7 +67,7 @@ void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx )
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-public function wrapped by ctr_crbg_init(). Necessary to allow NIST
|
||||
* Non-public function wrapped by mbedtls_ctr_drbg_init(). Necessary to allow NIST
|
||||
* tests to succeed (which require known length fixed entropy)
|
||||
*/
|
||||
int mbedtls_ctr_drbg_seed_entropy_len(
|
||||
|
@@ -417,6 +417,12 @@ static void buffer_alloc_free( void *ptr )
|
||||
heap.total_used -= hdr->size;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MEMORY_BACKTRACE)
|
||||
free( hdr->trace );
|
||||
hdr->trace = NULL;
|
||||
hdr->trace_count = 0;
|
||||
#endif
|
||||
|
||||
// Regroup with block before
|
||||
//
|
||||
if( hdr->prev != NULL && hdr->prev->alloc == 0 )
|
||||
@@ -432,9 +438,6 @@ static void buffer_alloc_free( void *ptr )
|
||||
if( hdr->next != NULL )
|
||||
hdr->next->prev = hdr;
|
||||
|
||||
#if defined(MBEDTLS_MEMORY_BACKTRACE)
|
||||
free( old->trace );
|
||||
#endif
|
||||
memset( old, 0, sizeof(memory_header) );
|
||||
}
|
||||
|
||||
@@ -474,9 +477,6 @@ static void buffer_alloc_free( void *ptr )
|
||||
if( hdr->next != NULL )
|
||||
hdr->next->prev = hdr;
|
||||
|
||||
#if defined(MBEDTLS_MEMORY_BACKTRACE)
|
||||
free( old->trace );
|
||||
#endif
|
||||
memset( old, 0, sizeof(memory_header) );
|
||||
}
|
||||
|
||||
@@ -491,11 +491,6 @@ static void buffer_alloc_free( void *ptr )
|
||||
heap.first_free = hdr;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_MEMORY_BACKTRACE)
|
||||
hdr->trace = NULL;
|
||||
hdr->trace_count = 0;
|
||||
#endif
|
||||
|
||||
if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_FREE ) && verify_chain() != 0 )
|
||||
mbedtls_exit( 1 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user