From 408319be3ab32f70af5b0d1fa6a9942ec64fe37d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 10 Dec 2018 17:34:00 +0100 Subject: [PATCH] Remove redundant check for slot->allocated This check became redundant when support for direct access to key slots was removed. --- library/psa_crypto.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index d272334d4..554da4bb4 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -899,8 +899,6 @@ psa_status_t psa_internal_release_key_slot( psa_key_handle_t handle ) status = psa_get_key_slot( handle, &slot ); if( status != PSA_SUCCESS ) return( status ); - if( ! slot->allocated ) - return( PSA_ERROR_INVALID_HANDLE ); return( psa_wipe_key_slot( slot ) ); }