diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2017-01-22 00:03:19 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2017-01-22 00:03:19 +0000 |
commit | 817b0ccc5bbd4532cffe70f2fcdfff3015d8fe72 (patch) | |
tree | 9d0b4f6ea56c2ed71a23c811c64acc6a2739fde9 | |
parent | be799f04528ecbce188d414bcc1b6fb566947dc2 (diff) |
There is no point in setting struct fields to zero, when you've already
zeroed the entire struct via memset.
ok beck@
-rw-r--r-- | lib/libssl/s3_lib.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index 5c7f2cb27cf..18c405d13a2 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.115 2016/12/30 17:20:51 jsing Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.116 2017/01/22 00:03:18 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1886,6 +1886,7 @@ ssl3_clear(SSL *s) s->s3->alpn_selected = NULL; memset(s->s3, 0, sizeof *s->s3); + s->s3->rbuf.buf = rp; s->s3->wbuf.buf = wp; s->s3->rbuf.len = rlen; @@ -1894,10 +1895,6 @@ ssl3_clear(SSL *s) ssl_free_wbio_buffer(s); s->packet_length = 0; - s->s3->renegotiate = 0; - s->s3->total_renegotiations = 0; - s->s3->num_renegotiations = 0; - s->s3->in_read_app_data = 0; s->version = TLS1_VERSION; free(s->next_proto_negotiated); |