Add guards for mbedtls_psa_crypto_free()

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-04-19 13:47:43 +02:00
parent 774f9debf2
commit 758aef60c5
32 changed files with 71 additions and 4 deletions
programs/x509

View file

@ -469,7 +469,9 @@ exit:
mbedtls_pk_free(&key);
mbedtls_ctr_drbg_free(&ctr_drbg);
mbedtls_entropy_free(&entropy);
#if defined(MBEDTLS_USE_PSA_CRYPTO)
mbedtls_psa_crypto_free();
#endif /* MBEDTLS_USE_PSA_CRYPTO */
cur = opt.san_list;
while (cur != NULL) {