From: Matt Caswell Date: Thu, 8 Sep 2016 09:00:56 +0000 (+0100) Subject: Ensure the WPACKET gets cleaned up in the event of an error X-Git-Tag: OpenSSL_1_1_1-pre1~3563 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=796a627e0a816ffbd79f53fa7d349e4edb624573;p=thirdparty%2Fopenssl.git Ensure the WPACKET gets cleaned up in the event of an error Otherwise a mem leak can occur. Reviewed-by: Rich Salz --- diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index b6895f5762d..4f123ddc981 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; }