summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
authorjsing <>2017-04-10 17:27:33 +0000
committerjsing <>2017-04-10 17:27:33 +0000
commit8bea6e7211234af80b7a52972d3c14596a38c767 (patch)
tree8385526871849725f6ed77516a693d277bbdfa91 /src/lib/libssl/ssl_sess.c
parentc8368f35409fe0a4a05ea25108a4055d6082d923 (diff)
downloadopenbsd-8bea6e7211234af80b7a52972d3c14596a38c767.tar.gz
openbsd-8bea6e7211234af80b7a52972d3c14596a38c767.tar.bz2
openbsd-8bea6e7211234af80b7a52972d3c14596a38c767.zip
Use freezero() for the internal opaque structures, instead of the current
explicit_bzero()/free(). Less code and potentially less overhead.
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r--src/lib/libssl/ssl_sess.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 5d80e58196..59d7d9ec24 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_sess.c,v 1.70 2017/02/07 02:08:38 beck Exp $ */ 1/* $OpenBSD: ssl_sess.c,v 1.71 2017/04/10 17:27:33 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 *
@@ -705,11 +705,8 @@ SSL_SESSION_free(SSL_SESSION *ss)
705 free(ss->internal->tlsext_ecpointformatlist); 705 free(ss->internal->tlsext_ecpointformatlist);
706 free(ss->internal->tlsext_supportedgroups); 706 free(ss->internal->tlsext_supportedgroups);
707 707
708 explicit_bzero(ss->internal, sizeof(*ss->internal)); 708 freezero(ss->internal, sizeof(*ss->internal));
709 free(ss->internal); 709 freezero(ss, sizeof(*ss));
710
711 explicit_bzero(ss, sizeof(*ss));
712 free(ss);
713} 710}
714 711
715int 712int