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 <Joe.Subbiani@arm.com>
This commit is contained in:
JoeSubbiani 2021-06-17 15:00:01 +01:00
parent 532327b429
commit 57face2f0b

View File

@ -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 */