diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-25 18:35:24 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-25 18:35:24 -0400 |
commit | 8fdc3734c063146b038608c2412a0f2c9b21b6d6 (patch) | |
tree | ed30d40a40a6bf7002121a29e3db4b4790a54d87 /apps | |
parent | 17dd65e6e1f888b4561d559b4d44fbbe0a0aa3e7 (diff) |
free NULL cleanup.
This gets EC_GROUP_clear_free EC_GROUP_free, EC_KEY_free,
EC_POINT_clear_free, EC_POINT_free
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/ec.c | 3 | ||||
-rw-r--r-- | apps/ecparam.c | 3 | ||||
-rw-r--r-- | apps/speed.c | 9 |
3 files changed, 5 insertions, 10 deletions
@@ -345,8 +345,7 @@ int MAIN(int argc, char **argv) end: BIO_free(in); BIO_free_all(out); - if (eckey) - EC_KEY_free(eckey); + EC_KEY_free(eckey); if (passin) OPENSSL_free(passin); if (passout) diff --git a/apps/ecparam.c b/apps/ecparam.c index d4177474d5..c6a175146c 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -623,8 +623,7 @@ int MAIN(int argc, char **argv) OPENSSL_free(buffer); BIO_free(in); BIO_free_all(out); - if (group != NULL) - EC_GROUP_free(group); + EC_GROUP_free(group); apps_shutdown(); OPENSSL_EXIT(ret); } diff --git a/apps/speed.c b/apps/speed.c index d2034a4898..df972a3b90 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2457,13 +2457,10 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_EC for (i = 0; i < EC_NUM; i++) - if (ecdsa[i] != NULL) - EC_KEY_free(ecdsa[i]); + EC_KEY_free(ecdsa[i]); for (i = 0; i < EC_NUM; i++) { - if (ecdh_a[i] != NULL) - EC_KEY_free(ecdh_a[i]); - if (ecdh_b[i] != NULL) - EC_KEY_free(ecdh_b[i]); + EC_KEY_free(ecdh_a[i]); + EC_KEY_free(ecdh_b[i]); } #endif |