Merge pull request #4676 from JoeSubbiani/MissingContextFree-test_suite_aes.function

Add missing free context in at the end of aes_crypt_xts_size()
This commit is contained in:
Dave Rodgman 2021-06-22 09:24:08 +01:00 committed by GitHub
commit 8f2b66a39a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* Fix a resource leak in a test suite with an alternative AES
implementation. Fixes #4176.

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