From df5640262324ebe8c1bd0445e35ab7811caa6214 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 13 May 2021 06:26:37 +0100 Subject: [PATCH] Fix memory leak upon ciphersuite mismatch during session resumption Signed-off-by: Hanno Becker --- library/ssl_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 196f69de7..213cd3ce6 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -2810,7 +2810,7 @@ static void ssl_handle_id_based_session_resumption( mbedtls_ssl_context *ssl ) exit: - mbedtls_platform_zeroize( &session_tmp, sizeof( session_tmp ) ); + mbedtls_ssl_session_free( &session_tmp ); } static int ssl_write_server_hello( mbedtls_ssl_context *ssl )