diff options
author | jsing <> | 2017-01-24 01:39:13 +0000 |
---|---|---|
committer | jsing <> | 2017-01-24 01:39:13 +0000 |
commit | e7f0c1112f2866fd2bd5e4a367df3ecb8b4c7566 (patch) | |
tree | c6bc631e79daa26f03a248466f27c2d391080a87 /src/lib/libssl/s3_clnt.c | |
parent | ea789c701e245815a7f66826c0ab19a4a9faf789 (diff) | |
download | openbsd-e7f0c1112f2866fd2bd5e4a367df3ecb8b4c7566.tar.gz openbsd-e7f0c1112f2866fd2bd5e4a367df3ecb8b4c7566.tar.bz2 openbsd-e7f0c1112f2866fd2bd5e4a367df3ecb8b4c7566.zip |
ssl_sess_cert_free() checks for NULL, so do not bother doing it at the
call sites.
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index 055f8d1f3a..e8cc0e3905 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_clnt.c,v 1.170 2017/01/23 13:36:13 jsing Exp $ */ | 1 | /* $OpenBSD: s3_clnt.c,v 1.171 2017/01/24 01:39:13 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 | * |
@@ -1037,8 +1037,7 @@ ssl3_get_server_certificate(SSL *s) | |||
1037 | sc = ssl_sess_cert_new(); | 1037 | sc = ssl_sess_cert_new(); |
1038 | if (sc == NULL) | 1038 | if (sc == NULL) |
1039 | goto err; | 1039 | goto err; |
1040 | if (SSI(s)->sess_cert) | 1040 | ssl_sess_cert_free(SSI(s)->sess_cert); |
1041 | ssl_sess_cert_free(SSI(s)->sess_cert); | ||
1042 | SSI(s)->sess_cert = sc; | 1041 | SSI(s)->sess_cert = sc; |
1043 | 1042 | ||
1044 | sc->cert_chain = sk; | 1043 | sc->cert_chain = sk; |