diff options
author | Matt Caswell <matt@openssl.org> | 2014-12-12 11:03:00 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-12-13 00:05:52 +0000 |
commit | 7516eaf49216c3525506c9dedc008737c4a06501 (patch) | |
tree | da5228a8f0fc7eebf8e79a0a25da168e5f63acb0 /ssl | |
parent | c6a84ff3516d8ecd92d866b6f0ae0d63df6d9c53 (diff) |
Fixed memory leak if BUF_MEM_grow fails
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit bb1ddd3d9a0d01656b90693a214b911995a5fe8c)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/d1_srvr.c | 1 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 6a075b3396..a5660bc25b 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -233,6 +233,7 @@ int dtls1_accept(SSL *s) } if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH)) { + BUF_MEM_free(buf); ret= -1; goto end; } diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index de909b1808..3178815ec9 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -192,6 +192,7 @@ int ssl23_accept(SSL *s) } if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH)) { + BUF_MEM_free(buf); ret= -1; goto end; } |