From 796a627e0a816ffbd79f53fa7d349e4edb624573 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 8 Sep 2016 10:00:56 +0100 Subject: [PATCH] Ensure the WPACKET gets cleaned up in the event of an error Otherwise a mem leak can occur. Reviewed-by: Rich Salz --- ssl/statem/statem_clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index b6895f5762..4f123ddc98 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -875,6 +875,7 @@ int tls_construct_client_hello(SSL *s) return 1; err: ossl_statem_set_error(s); + WPACKET_cleanup(&pkt); return 0; } -- 2.25.1