commit | da510d639001eda94bcbb1b3f330a6e8555851a9 | [log] [tgz] |
---|---|---|
author | Paul Elliott <paul.elliott@arm.com> | Thu Oct 24 14:41:01 2024 +0100 |
committer | Paul Elliott <paul.elliott@arm.com> | Thu Oct 24 14:58:22 2024 +0100 |
tree | acbd2fbef62d8a257f93291dce440fb8417b927c | |
parent | 65b276c613164c0bd4e65d288efb886a68df41d3 [diff] |
Fix double free in case of test failure Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tf-psa-crypto/tests/suites/test_suite_psa_crypto_memory.function b/tf-psa-crypto/tests/suites/test_suite_psa_crypto_memory.function index cc87848..50539e8 100644 --- a/tf-psa-crypto/tests/suites/test_suite_psa_crypto_memory.function +++ b/tf-psa-crypto/tests/suites/test_suite_psa_crypto_memory.function
@@ -107,7 +107,10 @@ exit: mbedtls_free(local_input.buffer); - mbedtls_free(input); + + if (local_input.buffer != input) { + mbedtls_free(input); + } } /* END_CASE */