From 312e9387fddacbcef4148bd3ace25c7db89e374e Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Sat, 4 Mar 2017 15:45:40 +0000 Subject: [PATCH] Fix a memory leak on an error path A leak of an SSL_SESSION object can occur when decoding a psk extension on an error path when using TLSv1.3 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/2843) --- ssl/statem/extensions_srvr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c index 83fb71313a..ab3ad468fb 100644 --- a/ssl/statem/extensions_srvr.c +++ b/ssl/statem/extensions_srvr.c @@ -796,6 +796,7 @@ int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x, s->session = sess; return 1; err: + SSL_SESSION_free(sess); return 0; } -- 2.25.1