mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-09 03:40:08 +00:00
Fixed memory leaks in tests
This commit is contained in:
parent
891998e0c3
commit
92b8dc0535
@ -32,6 +32,7 @@ pbkdf2_hmac:hash:hex_password_string:hex_salt_string:it_cnt:key_len:result_key_s
|
|||||||
TEST_ASSERT( md_init_ctx( &ctx, info ) == 0 );
|
TEST_ASSERT( md_init_ctx( &ctx, info ) == 0 );
|
||||||
TEST_ASSERT( pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
|
TEST_ASSERT( pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
|
||||||
{it_cnt}, {key_len}, key ) == 0 );
|
{it_cnt}, {key_len}, key ) == 0 );
|
||||||
|
TEST_ASSERT( md_free_ctx( &ctx ) == 0 );
|
||||||
|
|
||||||
hexify( dst_str, key, {key_len} );
|
hexify( dst_str, key, {key_len} );
|
||||||
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );
|
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );
|
||||||
|
@ -32,6 +32,7 @@ pbkdf2_hmac:hash:hex_password_string:hex_salt_string:it_cnt:key_len:result_key_s
|
|||||||
TEST_ASSERT( md_init_ctx( &ctx, info ) == 0 );
|
TEST_ASSERT( md_init_ctx( &ctx, info ) == 0 );
|
||||||
TEST_ASSERT( pkcs5_pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
|
TEST_ASSERT( pkcs5_pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
|
||||||
{it_cnt}, {key_len}, key ) == 0 );
|
{it_cnt}, {key_len}, key ) == 0 );
|
||||||
|
TEST_ASSERT( md_free_ctx( &ctx ) == 0 );
|
||||||
|
|
||||||
hexify( dst_str, key, {key_len} );
|
hexify( dst_str, key, {key_len} );
|
||||||
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );
|
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user