diff options
author | jsing <> | 2020-09-24 18:12:00 +0000 |
---|---|---|
committer | jsing <> | 2020-09-24 18:12:00 +0000 |
commit | 8635e0d5e37048ff870284c98a70b258bf377e20 (patch) | |
tree | b00661458f11b9cebfbf0036bd7b8ae827375208 /src/lib/libssl/ssl_lib.c | |
parent | e516f9888833076af8ba7f8c411514db2872aa94 (diff) | |
download | openbsd-8635e0d5e37048ff870284c98a70b258bf377e20.tar.gz openbsd-8635e0d5e37048ff870284c98a70b258bf377e20.tar.bz2 openbsd-8635e0d5e37048ff870284c98a70b258bf377e20.zip |
Simplify the cleanup of init_buf via a ssl3_release_init_buffer() function.
ok beck@ inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 65d5614bfb..6e375e1c09 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.233 2020/09/19 10:17:56 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.234 2020/09/24 18:12:00 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -196,8 +196,7 @@ SSL_clear(SSL *s) | |||
196 | tls13_ctx_free(s->internal->tls13); | 196 | tls13_ctx_free(s->internal->tls13); |
197 | s->internal->tls13 = NULL; | 197 | s->internal->tls13 = NULL; |
198 | 198 | ||
199 | BUF_MEM_free(s->internal->init_buf); | 199 | ssl3_release_init_buffer(s); |
200 | s->internal->init_buf = NULL; | ||
201 | 200 | ||
202 | ssl_clear_cipher_state(s); | 201 | ssl_clear_cipher_state(s); |
203 | 202 | ||
@@ -531,7 +530,7 @@ SSL_free(SSL *s) | |||
531 | 530 | ||
532 | tls13_ctx_free(s->internal->tls13); | 531 | tls13_ctx_free(s->internal->tls13); |
533 | 532 | ||
534 | BUF_MEM_free(s->internal->init_buf); | 533 | ssl3_release_init_buffer(s); |
535 | 534 | ||
536 | sk_SSL_CIPHER_free(s->cipher_list); | 535 | sk_SSL_CIPHER_free(s->cipher_list); |
537 | sk_SSL_CIPHER_free(s->internal->cipher_list_tls13); | 536 | sk_SSL_CIPHER_free(s->internal->cipher_list_tls13); |