From c16289503038a14fd36d914ebfa06608ae23f055 Mon Sep 17 00:00:00 2001 From: Hannes Tschofenig Date: Mon, 7 Dec 2020 11:04:09 +0100 Subject: [PATCH] Add call to mbedtls_x509_crt_free() --- library/ssl_tls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c9517e3d2..78637bad3 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -12057,6 +12057,7 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl ) #endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ #if defined(MBEDTLS_SSL_FREE_SERVER_CERTIFICATE) + mbedtls_x509_crt_free( ssl->session_negotiate->peer_cert ); mbedtls_free( ssl->session->peer_cert ); ssl->session->peer_cert = NULL; #endif /* MBEDTLS_SSL_FREE_SERVER_CERTIFICATE */