diff options
author | Matt Caswell <matt@openssl.org> | 2022-09-13 18:01:18 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2022-09-23 14:54:49 +0100 |
commit | 9ff519542387d32ab1c3a8b1f45a375e1712a383 (patch) | |
tree | be8c4ddb2f0564179a9ae0596d35b1052d545b9c /ssl/ssl_lib.c | |
parent | bafe524b5ce425105ac321f9fffa23e2d5b06845 (diff) |
Fix a record layer mem leak
Make sure we free the record layer before we free the connection BIOs
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19198)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 35758df33b..440d156975 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1361,13 +1361,13 @@ void ossl_ssl_connection_free(SSL *ssl) /* Ignore return value */ ssl_free_wbio_buffer(s); + RECORD_LAYER_clear(&s->rlayer); + BIO_free_all(s->wbio); s->wbio = NULL; BIO_free_all(s->rbio); s->rbio = NULL; - RECORD_LAYER_clear(&s->rlayer); - BUF_MEM_free(s->init_buf); /* add extra stuff */ |