mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 20:25:53 +01:00
psa_crypto_storage: Annotate file removal after a failed creation
Let static analyzers know that it's ok if psa_its_remove() fails here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
bab1b52048
commit
169ca7f06d
@ -174,7 +174,13 @@ static psa_status_t psa_crypto_storage_store( const psa_key_file_id_t key,
|
|||||||
|
|
||||||
exit:
|
exit:
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
psa_its_remove( data_identifier );
|
{
|
||||||
|
/* Remove the file in case we managed to create it but something
|
||||||
|
* went wrong. It's ok if the file doesn't exist. If the file exists
|
||||||
|
* but the removal fails, we're already reporting an error so there's
|
||||||
|
* nothing else we can do. */
|
||||||
|
(void) psa_its_remove( data_identifier );
|
||||||
|
}
|
||||||
return( status );
|
return( status );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user