summaryrefslogtreecommitdiffstats
path: root/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2017-01-24 14:57:31 +0000
committerjsing <jsing@openbsd.org>2017-01-24 14:57:31 +0000
commit2da53ce5a262494b116213d78f7f70f77a590551 (patch)
tree08a54d1f04c49d31954fb8d623d2a1a9c1ebad0f /lib/libssl/s3_clnt.c
parentKill some unused variables found by clang. (diff)
downloadwireguard-openbsd-2da53ce5a262494b116213d78f7f70f77a590551.tar.xz
wireguard-openbsd-2da53ce5a262494b116213d78f7f70f77a590551.zip
sk_pop_free() checks for NULL so do not bother doing it from the callers.
Diffstat (limited to 'lib/libssl/s3_clnt.c')
-rw-r--r--lib/libssl/s3_clnt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libssl/s3_clnt.c b/lib/libssl/s3_clnt.c
index e8cc0e3905f..e44a025e571 100644
--- a/lib/libssl/s3_clnt.c
+++ b/lib/libssl/s3_clnt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_clnt.c,v 1.171 2017/01/24 01:39:13 jsing Exp $ */
+/* $OpenBSD: s3_clnt.c,v 1.172 2017/01/24 14:57:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1723,8 +1723,7 @@ ssl3_get_certificate_request(SSL *s)
/* we should setup a certificate to return.... */
S3I(s)->tmp.cert_req = 1;
S3I(s)->tmp.ctype_num = ctype_num;
- if (S3I(s)->tmp.ca_names != NULL)
- sk_X509_NAME_pop_free(S3I(s)->tmp.ca_names, X509_NAME_free);
+ sk_X509_NAME_pop_free(S3I(s)->tmp.ca_names, X509_NAME_free);
S3I(s)->tmp.ca_names = ca_sk;
ca_sk = NULL;
@@ -1736,8 +1735,7 @@ truncated:
}
err:
X509_NAME_free(xn);
- if (ca_sk != NULL)
- sk_X509_NAME_pop_free(ca_sk, X509_NAME_free);
+ sk_X509_NAME_pop_free(ca_sk, X509_NAME_free);
return (ret);
}