esp-tls: fix memory leak when using CA certification validation

This commit is contained in:
redchenjs 2018-04-22 01:13:09 +08:00
parent 4e982d4b18
commit 854c5260d4
No known key found for this signature in database
GPG key ID: 1B127B42AF02CF8E

View file

@ -136,7 +136,7 @@ static void mbedtls_cleanup(esp_tls_t *tls)
if (!tls) { if (!tls) {
return; return;
} }
mbedtls_x509_crt_free(&tls->cacert);
mbedtls_entropy_free(&tls->entropy); mbedtls_entropy_free(&tls->entropy);
mbedtls_ssl_config_free(&tls->conf); mbedtls_ssl_config_free(&tls->conf);
mbedtls_ctr_drbg_free(&tls->ctr_drbg); mbedtls_ctr_drbg_free(&tls->ctr_drbg);