]> 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:33:55 +0000 (17:33 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22637)

ssl/s3_lib.c

index 1f778c342347310b9672133716b02b5b85c3c110..e8ec98c221540be7d5537302d7fb3bfe9ab6c80c 100644 (file)
@@ -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