Replace malloc with calloc

- platform layer currently broken (not adapted yet)
- memmory_buffer_alloc too
This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-26 16:04:06 +02:00
parent 065122cfe9
commit 7551cb9ee9
31 changed files with 122 additions and 131 deletions

View file

@ -23,7 +23,7 @@ void mbedtls_pem_write_buffer( char *start, char *end, char *buf_str, char *resu
ret = mbedtls_pem_write_buffer( start, end, buf, buf_len, NULL, 0, &olen );
TEST_ASSERT( ret == MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );
check_buf = (unsigned char *) mbedtls_malloc( olen );
check_buf = (unsigned char *) mbedtls_calloc( 1, olen );
TEST_ASSERT( check_buf != NULL );
memset( check_buf, 0, olen );