summaryrefslogtreecommitdiff
path: root/lib/libssl/d1_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/d1_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/d1_lib.c')
-rw-r--r--lib/libssl/d1_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c
index 8092d56a4c8..7e919a6c9bb 100644
--- a/lib/libssl/d1_lib.c
+++ b/lib/libssl/d1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_lib.c,v 1.41 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: d1_lib.c,v 1.42 2017/04/10 17:27:33 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -191,11 +191,8 @@ dtls1_free(SSL *s)
pqueue_free(s->d1->sent_messages);
pqueue_free(D1I(s)->buffered_app_data.q);
- explicit_bzero(s->d1->internal, sizeof(*s->d1->internal));
- free(s->d1->internal);
-
- explicit_bzero(s->d1, sizeof(*s->d1));
- free(s->d1);
+ freezero(s->d1->internal, sizeof(*s->d1->internal));
+ freezero(s->d1, sizeof(*s->d1));
s->d1 = NULL;
}