Fix double free in case of test failure

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2024-10-24 14:41:01 +01:00
parent 65b276c613
commit da510d6390

View File

@ -107,7 +107,10 @@ void local_input_alloc(int input_len, psa_status_t exp_status)
exit:
mbedtls_free(local_input.buffer);
mbedtls_free(input);
if (local_input.buffer != input) {
mbedtls_free(input);
}
}
/* END_CASE */