From: Matt Caswell Date: Thu, 4 Dec 2014 09:56:16 +0000 (+0000) Subject: Fixed memory leak in the event of a failure of BUF_MEM_grow X-Git-Tag: OpenSSL_1_0_1k~56 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b8b9bcb4587f6df315223ae18ec10ecdb5a9dab8;p=oweals%2Fopenssl.git Fixed memory leak in the event of a failure of BUF_MEM_grow Reviewed-by: Richard Levitte (cherry picked from commit 41bf25013032da0eeb111ce3c8fc0946c0e61c41) --- diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 59ff271381..c67f11a724 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -286,6 +286,7 @@ int ssl3_accept(SSL *s) } if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH)) { + BUF_MEM_free(buf); ret= -1; goto end; }