From 8bea6e7211234af80b7a52972d3c14596a38c767 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 10 Apr 2017 17:27:33 +0000 Subject: Use freezero() for the internal opaque structures, instead of the current explicit_bzero()/free(). Less code and potentially less overhead. --- src/lib/libssl/s3_lib.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib/libssl/s3_lib.c') diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 1fd077ec6e..d4142e743f 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/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; } -- cgit v1.2.3-55-g6feb