From 57face2f0b3c18368c7ac21f03e45f3b5a92233d Mon Sep 17 00:00:00 2001 From: JoeSubbiani Date: Thu, 17 Jun 2021 15:00:01 +0100 Subject: [PATCH] Free context in at the end of aes_crypt_xts_size() in file tests/suite/test_suite_aes.function, aes_crypt_xts_size() did not free the context upon the function exit. The function now frees the context on exit. Fixes #4176 Signed-off-by: JoeSubbiani --- tests/suites/test_suite_aes.function | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function index aa3df92fa..dac6edc95 100644 --- a/tests/suites/test_suite_aes.function +++ b/tests/suites/test_suite_aes.function @@ -207,6 +207,8 @@ void aes_crypt_xts_size( int size, int retval ) memset( data_unit, 0x00, sizeof( data_unit ) ); TEST_ASSERT( mbedtls_aes_crypt_xts( &ctx, MBEDTLS_AES_ENCRYPT, length, data_unit, src, output ) == retval ); +exit: + mbedtls_aes_xts_free(&ctx); } /* END_CASE */