diff options
author | 2017-01-24 14:57:31 +0000 | |
---|---|---|
committer | 2017-01-24 14:57:31 +0000 | |
commit | 2da53ce5a262494b116213d78f7f70f77a590551 (patch) | |
tree | 08a54d1f04c49d31954fb8d623d2a1a9c1ebad0f /lib/libssl/s3_srvr.c | |
parent | Kill some unused variables found by clang. (diff) | |
download | wireguard-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_srvr.c')
-rw-r--r-- | lib/libssl/s3_srvr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libssl/s3_srvr.c b/lib/libssl/s3_srvr.c index 37095877422..c6d340026a8 100644 --- a/lib/libssl/s3_srvr.c +++ b/lib/libssl/s3_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_srvr.c,v 1.152 2017/01/24 12:22:23 jsing Exp $ */ +/* $OpenBSD: s3_srvr.c,v 1.153 2017/01/24 14:57:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2595,8 +2595,7 @@ ssl3_get_client_certificate(SSL *s) goto err; } } - if (SSI(s)->sess_cert->cert_chain != NULL) - sk_X509_pop_free(SSI(s)->sess_cert->cert_chain, X509_free); + sk_X509_pop_free(SSI(s)->sess_cert->cert_chain, X509_free); SSI(s)->sess_cert->cert_chain = sk; /* @@ -2617,8 +2616,8 @@ f_err: } err: X509_free(x); - if (sk != NULL) - sk_X509_pop_free(sk, X509_free); + sk_X509_pop_free(sk, X509_free); + return (ret); } |