From e92c68a8786ae82302e2b9877ef86de4691ae620 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 26 Aug 2020 00:06:25 +0200 Subject: [PATCH] Note that a failure in cleanup is intentional In the cleanup code for persistent_key_load_key_from_storage(), we only attempt to reopen the key so that it will be deleted if it exists at that point. It's intentional that we do nothing if psa_open_key() fails here. Signed-off-by: Gilles Peskine --- tests/suites/test_suite_psa_crypto.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 635114137..e48cb9054 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -5651,7 +5651,7 @@ exit: /* In case there was a test failure after creating the persistent key * but while it was not open, try to re-open the persistent key * to delete it. */ - psa_open_key( key_id, &handle ); + (void) psa_open_key( key_id, &handle ); } psa_destroy_key( handle ); PSA_DONE();