diff options
author | jsing <> | 2018-02-07 04:57:06 +0000 |
---|---|---|
committer | jsing <> | 2018-02-07 04:57:06 +0000 |
commit | c7d1d02db43b809b96238f8b557cfc2b8caa4b8a (patch) | |
tree | 1258fdeb45b6c2032685b30b591acc869df74b4c /src/usr.bin/openssl/s_client.c | |
parent | 91513e7059067d6b8438c18b4a274825340acad0 (diff) | |
download | openbsd-c7d1d02db43b809b96238f8b557cfc2b8caa4b8a.tar.gz openbsd-c7d1d02db43b809b96238f8b557cfc2b8caa4b8a.tar.bz2 openbsd-c7d1d02db43b809b96238f8b557cfc2b8caa4b8a.zip |
Remove guards around *_free() calls since these functions handle NULL.
Diffstat (limited to '')
-rw-r--r-- | src/usr.bin/openssl/s_client.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c index f81d1a61bb..158992aa04 100644 --- a/src/usr.bin/openssl/s_client.c +++ b/src/usr.bin/openssl/s_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_client.c,v 1.33 2017/08/12 21:04:33 jsing Exp $ */ | 1 | /* $OpenBSD: s_client.c,v 1.34 2018/02/07 04:57:06 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 | * |
@@ -1212,15 +1212,11 @@ end: | |||
1212 | print_stuff(bio_c_out, con, 1); | 1212 | print_stuff(bio_c_out, con, 1); |
1213 | SSL_free(con); | 1213 | SSL_free(con); |
1214 | } | 1214 | } |
1215 | if (ctx != NULL) | 1215 | SSL_CTX_free(ctx); |
1216 | SSL_CTX_free(ctx); | 1216 | X509_free(cert); |
1217 | if (cert) | 1217 | EVP_PKEY_free(key); |
1218 | X509_free(cert); | ||
1219 | if (key) | ||
1220 | EVP_PKEY_free(key); | ||
1221 | free(pass); | 1218 | free(pass); |
1222 | if (vpm) | 1219 | X509_VERIFY_PARAM_free(vpm); |
1223 | X509_VERIFY_PARAM_free(vpm); | ||
1224 | freezero(cbuf, BUFSIZZ); | 1220 | freezero(cbuf, BUFSIZZ); |
1225 | freezero(sbuf, BUFSIZZ); | 1221 | freezero(sbuf, BUFSIZZ); |
1226 | freezero(mbuf, BUFSIZZ); | 1222 | freezero(mbuf, BUFSIZZ); |
@@ -1405,8 +1401,7 @@ print_stuff(BIO * bio, SSL * s, int full) | |||
1405 | } | 1401 | } |
1406 | } | 1402 | } |
1407 | BIO_printf(bio, "---\n"); | 1403 | BIO_printf(bio, "---\n"); |
1408 | if (peer != NULL) | 1404 | X509_free(peer); |
1409 | X509_free(peer); | ||
1410 | /* flush, or debugging output gets mixed with http response */ | 1405 | /* flush, or debugging output gets mixed with http response */ |
1411 | (void) BIO_flush(bio); | 1406 | (void) BIO_flush(bio); |
1412 | } | 1407 | } |