From 709120a9ceb73dd02578d487caebee0a51491767 Mon Sep 17 00:00:00 2001 From: Ryan Everett Date: Mon, 15 Jan 2024 11:19:03 +0000 Subject: [PATCH] Revert change to return behaviour in psa_reserve_free_key_slot This change was a mistake, we still need to wipe the pointers here. Signed-off-by: Ryan Everett --- library/psa_crypto_slot_management.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto_slot_management.c b/library/psa_crypto_slot_management.c index 3accacff0a..8d7ff908e1 100644 --- a/library/psa_crypto_slot_management.c +++ b/library/psa_crypto_slot_management.c @@ -199,7 +199,7 @@ psa_status_t psa_reserve_free_key_slot(psa_key_id_t *volatile_key_id, status = psa_key_slot_state_transition(selected_slot, PSA_SLOT_EMPTY, PSA_SLOT_FILLING); if (status != PSA_SUCCESS) { - return status; + goto error; } *volatile_key_id = PSA_KEY_ID_VOLATILE_MIN +