diff options
author | mmcc <> | 2016-03-11 07:08:45 +0000 |
---|---|---|
committer | mmcc <> | 2016-03-11 07:08:45 +0000 |
commit | 13f852f88b7f59607c91ef9ac8a34ae4e55e08ca (patch) | |
tree | b799fc9672743546b69747e9e1d53d9423de380c /src/lib/libssl/ssl_sess.c | |
parent | e11a59757e997c4effb65f1ad3aa27df9dff42f5 (diff) | |
download | openbsd-13f852f88b7f59607c91ef9ac8a34ae4e55e08ca.tar.gz openbsd-13f852f88b7f59607c91ef9ac8a34ae4e55e08ca.tar.bz2 openbsd-13f852f88b7f59607c91ef9ac8a34ae4e55e08ca.zip |
X509_free(3) is NULL-safe, so remove NULL checks before its calls.
ok doug@
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 7052e8aa56..16dd5c444c 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.48 2015/09/10 17:57:50 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.49 2016/03/11 07:08:45 mmcc 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 | * |
@@ -697,8 +697,7 @@ SSL_SESSION_free(SSL_SESSION *ss) | |||
697 | explicit_bzero(ss->session_id, sizeof ss->session_id); | 697 | explicit_bzero(ss->session_id, sizeof ss->session_id); |
698 | if (ss->sess_cert != NULL) | 698 | if (ss->sess_cert != NULL) |
699 | ssl_sess_cert_free(ss->sess_cert); | 699 | ssl_sess_cert_free(ss->sess_cert); |
700 | if (ss->peer != NULL) | 700 | X509_free(ss->peer); |
701 | X509_free(ss->peer); | ||
702 | if (ss->ciphers != NULL) | 701 | if (ss->ciphers != NULL) |
703 | sk_SSL_CIPHER_free(ss->ciphers); | 702 | sk_SSL_CIPHER_free(ss->ciphers); |
704 | free(ss->tlsext_hostname); | 703 | free(ss->tlsext_hostname); |