summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2017-04-10 17:27:34 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2017-04-10 17:27:34 +0000
commit626b6ad1acb97c0ac2482bb9a907bc1000df4cd0 (patch)
tree158f1aca734fda99c125faf11c9ab44788d2a96e /lib/libssl/s3_lib.c
parente050e5bffa4c3b1561003bd0b4046e115d593d45 (diff)
Use freezero() for the internal opaque structures, instead of the current
explicit_bzero()/free(). Less code and potentially less overhead.
Diffstat (limited to 'lib/libssl/s3_lib.c')
-rw-r--r--lib/libssl/s3_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index 1fd077ec6e1..d4142e743fc 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.139 2017/04/10 17:25:22 jsing Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.140 2017/04/10 17:27:33 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1844,11 +1844,8 @@ ssl3_free(SSL *s)
free(S3I(s)->alpn_selected);
- explicit_bzero(S3I(s), sizeof(*S3I(s)));
- free(S3I(s));
-
- explicit_bzero(s->s3, sizeof(*s->s3));
- free(s->s3);
+ freezero(S3I(s), sizeof(*S3I(s)));
+ freezero(s->s3, sizeof(*s->s3));
s->s3 = NULL;
}