From e158ada6a74e5903354fdd5a6f56a32bbbba69fd Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 17 Oct 2022 15:46:02 +0100 Subject: Remove the old buffer management code We no longer use the old buffer management code now that it has all been moved to the new record layer. Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19424) --- ssl/d1_lib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ssl/d1_lib.c') diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index b82ddec517..a4ac629926 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -454,14 +454,12 @@ int DTLSv1_listen(SSL *ssl, BIO_ADDR *client) return -1; } - if (!ssl3_setup_buffers(s)) { - /* ERR_raise() already called */ - return -1; - } buf = OPENSSL_malloc(DTLS1_RT_HEADER_LENGTH + SSL3_RT_MAX_PLAIN_LENGTH); if (buf == NULL) return -1; - wbuf = RECORD_LAYER_get_wbuf(&s->rlayer)[0].buf; + wbuf = OPENSSL_malloc(DTLS1_RT_HEADER_LENGTH + SSL3_RT_MAX_PLAIN_LENGTH); + if (buf == NULL) + return -1; do { /* Get a packet */ @@ -836,6 +834,7 @@ int DTLSv1_listen(SSL *ssl, BIO_ADDR *client) end: BIO_ADDR_free(tmpclient); OPENSSL_free(buf); + OPENSSL_free(wbuf); return ret; } #endif -- cgit v1.2.3