From 92b8dc0535a8da1e60566c3fa865d545d5fc13e6 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Wed, 3 Jul 2013 14:45:46 +0200
Subject: [PATCH] Fixed memory leaks in tests
---
tests/suites/test_suite_pbkdf2.function | 1 +
tests/suites/test_suite_pkcs5.function | 1 +
2 files changed, 2 insertions(+)
diff --git a/tests/suites/test_suite_pbkdf2.function b/tests/suites/test_suite_pbkdf2.function
index 907f4787fe..79d111955b 100644
--- a/tests/suites/test_suite_pbkdf2.function
+++ b/tests/suites/test_suite_pbkdf2.function
@@ -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( pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
{it_cnt}, {key_len}, key ) == 0 );
+ TEST_ASSERT( md_free_ctx( &ctx ) == 0 );
hexify( dst_str, key, {key_len} );
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );
diff --git a/tests/suites/test_suite_pkcs5.function b/tests/suites/test_suite_pkcs5.function
index 2874c0886a..ae546624f2 100644
--- a/tests/suites/test_suite_pkcs5.function
+++ b/tests/suites/test_suite_pkcs5.function
@@ -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( pkcs5_pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
{it_cnt}, {key_len}, key ) == 0 );
+ TEST_ASSERT( md_free_ctx( &ctx ) == 0 );
hexify( dst_str, key, {key_len} );
TEST_ASSERT( strcmp( (char *) dst_str, {result_key_string} ) == 0 );