summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorjsing <>2017-01-24 01:39:13 +0000
committerjsing <>2017-01-24 01:39:13 +0000
commit71e6acb0d65f7db5b5d23d22c0a5eaf2fd76d0c4 (patch)
treec6bc631e79daa26f03a248466f27c2d391080a87 /src/lib/libssl/s3_clnt.c
parentb5d6131967f710b6a891d71f8169f959e20be4da (diff)
downloadopenbsd-71e6acb0d65f7db5b5d23d22c0a5eaf2fd76d0c4.tar.gz
openbsd-71e6acb0d65f7db5b5d23d22c0a5eaf2fd76d0c4.tar.bz2
openbsd-71e6acb0d65f7db5b5d23d22c0a5eaf2fd76d0c4.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.c5
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;