diff options
author | 2017-01-24 01:39:13 +0000 | |
---|---|---|
committer | 2017-01-24 01:39:13 +0000 | |
commit | 47dd5b40b91ee03fe932e99b0cf50aee93b86245 (patch) | |
tree | 857b0b82e284751e7d764fb5b20d72b4e14b7191 /lib/libssl/ssl_sess.c | |
parent | There is no point in zeroing fields that exist within a struct that is (diff) | |
download | wireguard-openbsd-47dd5b40b91ee03fe932e99b0cf50aee93b86245.tar.xz wireguard-openbsd-47dd5b40b91ee03fe932e99b0cf50aee93b86245.zip |
ssl_sess_cert_free() checks for NULL, so do not bother doing it at the
call sites.
Diffstat (limited to 'lib/libssl/ssl_sess.c')
-rw-r--r-- | lib/libssl/ssl_sess.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c index 4033b1e8f1e..2ebdf81b41f 100644 --- a/lib/libssl/ssl_sess.c +++ b/lib/libssl/ssl_sess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sess.c,v 1.64 2017/01/24 01:34:09 jsing Exp $ */ +/* $OpenBSD: ssl_sess.c,v 1.65 2017/01/24 01:39:13 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -699,11 +699,14 @@ SSL_SESSION_free(SSL_SESSION *ss) explicit_bzero(ss->master_key, sizeof ss->master_key); explicit_bzero(ss->session_id, sizeof ss->session_id); - if (ss->internal->sess_cert != NULL) - ssl_sess_cert_free(ss->internal->sess_cert); + + ssl_sess_cert_free(ss->internal->sess_cert); + X509_free(ss->peer); + if (ss->ciphers != NULL) sk_SSL_CIPHER_free(ss->ciphers); + free(ss->tlsext_hostname); free(ss->tlsext_tick); free(ss->internal->tlsext_ecpointformatlist); |