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_both.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_both.c')
-rw-r--r-- | src/lib/libssl/ssl_both.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_both.c b/src/lib/libssl/ssl_both.c index dff44ecd41..5da450b5ce 100644 --- a/src/lib/libssl/ssl_both.c +++ b/src/lib/libssl/ssl_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_both.c,v 1.19 2020/09/24 17:59:54 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_both.c,v 1.20 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 | * |
@@ -686,6 +686,16 @@ err: | |||
686 | return (0); | 686 | return (0); |
687 | } | 687 | } |
688 | 688 | ||
689 | void | ||
690 | ssl3_release_init_buffer(SSL *s) | ||
691 | { | ||
692 | BUF_MEM_free(s->internal->init_buf); | ||
693 | s->internal->init_buf = NULL; | ||
694 | s->internal->init_msg = NULL; | ||
695 | s->internal->init_num = 0; | ||
696 | s->internal->init_off = 0; | ||
697 | } | ||
698 | |||
689 | int | 699 | int |
690 | ssl3_setup_read_buffer(SSL *s) | 700 | ssl3_setup_read_buffer(SSL *s) |
691 | { | 701 | { |