mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
smtp_client: Fix heap leakage
- Freed all allocated resources by Mbed TLS at the end of routine
This commit is contained in:
@ -482,8 +482,12 @@ static void smtp_client_task(void *pvParameters)
|
|||||||
ret = 0; /* No errors */
|
ret = 0; /* No errors */
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_ssl_session_reset(&ssl);
|
|
||||||
mbedtls_net_free(&server_fd);
|
mbedtls_net_free(&server_fd);
|
||||||
|
mbedtls_x509_crt_free(&cacert);
|
||||||
|
mbedtls_ssl_free(&ssl);
|
||||||
|
mbedtls_ssl_config_free(&conf);
|
||||||
|
mbedtls_ctr_drbg_free(&ctr_drbg);
|
||||||
|
mbedtls_entropy_free(&entropy);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
mbedtls_strerror(ret, buf, 100);
|
mbedtls_strerror(ret, buf, 100);
|
||||||
|
Reference in New Issue
Block a user