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:02:20 +0000 |
commit | 24097938ad19acaaac00f4e8549bfe1a976d662d (patch) | |
tree | 0e8f3532f285395b7828c2663b2b63847efddec4 /ssl | |
parent | c3f22253b139793ff3b91ff7e6969e180cf06815 (diff) |
Fixed memory leak if BUF_MEM_grow fails
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
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 aef38bb754..0cdc51be23 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -251,6 +251,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 08aa5b6cf0..6e44e0cd64 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; } |