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:06:10 +0000 |
commit | c3132708368e4d13ddfc74be225a979d16a6a37e (patch) | |
tree | 6b8839823134910923366367aa337023f4d475e8 | |
parent | af8a66d10d320b614a60493c94cf5995a3639f87 (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)
-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 139f5f39a4..a14fb43138 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -209,6 +209,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 f1974e0e3b..d2b3317c4d 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -185,6 +185,7 @@ int ssl23_accept(SSL *s) } if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH)) { + BUF_MEM_free(buf); ret= -1; goto end; } |