summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2023-11-06 10:44:27 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2023-11-09 17:33:55 +0100
commita2b1ab6100d5f0fb50b61d241471eea087415632 (patch)
tree29b38c8dc707053db43997cb0266eb9cee2cdcd2 /ssl
parent7fe3010471a3263b2469ae35589357089050ce62 (diff)
Fix a possible memory leak of ssl->s3.tmp.psk
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22637)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 1f778c3423..e8ec98c221 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3371,6 +3371,10 @@ void ssl3_free(SSL *s)
OPENSSL_free(sc->s3.alpn_selected);
OPENSSL_free(sc->s3.alpn_proposed);
+#ifndef OPENSSL_NO_PSK
+ OPENSSL_free(sc->s3.tmp.psk);
+#endif
+
#ifndef OPENSSL_NO_SRP
ssl_srp_ctx_free_intern(sc);
#endif