diff options
| author | jsing <> | 2020-09-24 18:12:00 +0000 |
|---|---|---|
| committer | jsing <> | 2020-09-24 18:12:00 +0000 |
| commit | 10841ee643f560678ff5ed0276c4da735ec37bdf (patch) | |
| tree | b00661458f11b9cebfbf0036bd7b8ae827375208 /src/lib/libssl/ssl_both.c | |
| parent | 1328e78055c6ad087ebbec8484862dea13576ef5 (diff) | |
| download | openbsd-10841ee643f560678ff5ed0276c4da735ec37bdf.tar.gz openbsd-10841ee643f560678ff5ed0276c4da735ec37bdf.tar.bz2 openbsd-10841ee643f560678ff5ed0276c4da735ec37bdf.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 | { |
