From beb7767d248a0db53baf276ef951f08f207a6b6c Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 24 Sep 2020 18:12:00 +0000 Subject: Simplify the cleanup of init_buf via a ssl3_release_init_buffer() function. ok beck@ inoguchi@ tb@ --- lib/libssl/ssl_lib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/libssl/ssl_lib.c') diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 65d5614bfbf..6e375e1c099 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.233 2020/09/19 10:17:56 tb Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.234 2020/09/24 18:12:00 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -196,8 +196,7 @@ SSL_clear(SSL *s) tls13_ctx_free(s->internal->tls13); s->internal->tls13 = NULL; - BUF_MEM_free(s->internal->init_buf); - s->internal->init_buf = NULL; + ssl3_release_init_buffer(s); ssl_clear_cipher_state(s); @@ -531,7 +530,7 @@ SSL_free(SSL *s) tls13_ctx_free(s->internal->tls13); - BUF_MEM_free(s->internal->init_buf); + ssl3_release_init_buffer(s); sk_SSL_CIPHER_free(s->cipher_list); sk_SSL_CIPHER_free(s->internal->cipher_list_tls13); -- cgit v1.2.3-59-g8ed1b