From 841c2b174820a864b6edd6930495888ab278e8cd Mon Sep 17 00:00:00 2001 From: lhuang04 Date: Tue, 11 Jun 2024 12:31:17 -0700 Subject: [PATCH] Set psk to NULL in ssl_psk_remove-backport to 2.28 Summary: Back port [PR 9241](https://github.com/Mbed-TLS/mbedtls/pull/9241) to 2.28 branch Test Plan: Reviewers: Subscribers: Tasks: Tags: --- library/ssl_tls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c667a2923bf7..61494341040d 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4452,6 +4452,7 @@ static void ssl_remove_psk(mbedtls_ssl_context *ssl) ssl->handshake->psk_len); mbedtls_free(ssl->handshake->psk); ssl->handshake->psk_len = 0; + ssl->handshake->psk = NULL; } }