Skip to content

Commit 57a0ba9

Browse files
authored
Merge pull request #3 from TommyHolt/2
Fixed issue #2 Memory leak
2 parents f0a01bc + d890622 commit 57a0ba9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main/wifi_tls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ static int wifi_tls_reset_context(wifi_tls_context_t *ctx)
383383
mbedtls_ssl_config_free(&ctx->ssl_conf);
384384
mbedtls_ctr_drbg_free(&ctx->ctr_drbg);
385385
mbedtls_x509_crt_free(&ctx->root_ca_cert);
386+
mbedtls_x509_crt_free(&ctx->peer_cert);
386387
mbedtls_ssl_free(&ctx->ssl);
387388

388389
ESP_LOGD(TAG, "wifi_tls_reset_context: context reset for server: %s", ctx->server_host_name);

0 commit comments

Comments
 (0)