diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /test/ssltest.c | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) | |
download | openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.gz |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/ssltest.c')
-rw-r--r-- | test/ssltest.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/ssltest.c b/test/ssltest.c index 311fbc9d61..8b5ff3e426 100644 --- a/test/ssltest.c +++ b/test/ssltest.c @@ -466,10 +466,8 @@ static int verify_alpn(SSL *client, SSL *server) SSL_get0_alpn_selected(client, &client_proto, &client_proto_len); SSL_get0_alpn_selected(server, &server_proto, &server_proto_len); - if (alpn_selected != NULL) { - OPENSSL_free(alpn_selected); - alpn_selected = NULL; - } + OPENSSL_free(alpn_selected); + alpn_selected = NULL; if (client_proto_len != server_proto_len || memcmp(client_proto, server_proto, client_proto_len) != 0) { @@ -2457,11 +2455,8 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count) BIO_free(s_to_c); BIO_free_all(c_bio); BIO_free_all(s_bio); - - if (cbuf) - OPENSSL_free(cbuf); - if (sbuf) - OPENSSL_free(sbuf); + OPENSSL_free(cbuf); + OPENSSL_free(sbuf); return (ret); } |