mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-23 04:26:46 -04: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
f9ac5e7728
commit
35f2220e37
@ -497,6 +497,14 @@ exit:
|
||||
#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;
|
||||
while (cur != NULL) {
|
||||
mbedtls_x509_san_list *next = cur->next;
|
||||
@ -514,22 +522,6 @@ exit:
|
||||
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);
|
||||
}
|
||||
#endif /* MBEDTLS_X509_CSR_WRITE_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user