mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-07-26 11:50:40 +08:00
Remove redundant free loop
This version is incomplete. I failed to noticed it when adding a more complete version, making the existing one redundant. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
bda3ab9278
commit
8de781d99d
@ -495,6 +495,14 @@ exit:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mbedtls_x509write_csr_free(&req);
|
||||||
|
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;
|
cur = opt.san_list;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
mbedtls_x509_san_list *next = cur->next;
|
mbedtls_x509_san_list *next = cur->next;
|
||||||
@ -512,22 +520,6 @@ exit:
|
|||||||
cur = next;
|
cur = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbedtls_x509write_csr_free(&req);
|
|
||||||
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) {
|
|
||||||
prev = cur;
|
|
||||||
cur = cur->next;
|
|
||||||
mbedtls_free(prev);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mbedtls_exit(exit_code);
|
mbedtls_exit(exit_code);
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_X509_CSR_WRITE_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO &&
|
#endif /* MBEDTLS_X509_CSR_WRITE_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user