]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a possible memory leak of ssl->s3.tmp.psk
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 6 Nov 2023 09:44:27 +0000 (10:44 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 9 Nov 2023 16:36:13 +0000 (17:36 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22637)

(cherry picked from commit a2b1ab6100d5f0fb50b61d241471eea087415632)

ssl/s3_lib.c

index 78d4f040565d1d54f83abbd4fc73504f614846b7..460b84325d6f01be0b58f448b2ff5d0b3894bd6d 100644 (file)
@@ -3365,6 +3365,10 @@ void ssl3_free(SSL *s)
     OPENSSL_free(s->s3.alpn_selected);
     OPENSSL_free(s->s3.alpn_proposed);
 
+#ifndef OPENSSL_NO_PSK
+    OPENSSL_free(sc->s3.tmp.psk);
+#endif
+
 #ifndef OPENSSL_NO_SRP
     ssl_srp_ctx_free_intern(s);
 #endif