diff options
author | Rich Salz <rsalz@akamai.com> | 2015-03-24 10:17:37 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2015-03-24 23:17:16 -0400 |
commit | d64070838ebba86f00fb3755df5d3e65106e1628 (patch) | |
tree | def90b3063d9ebe0f53920604d02b9786216e327 /apps/speed.c | |
parent | 1300705a47b9c9498b15a384c6c5348adc342e2c (diff) |
free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove
any if check before calling them.
This gets DH_free, DSA_free, RSA_free
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/speed.c')
-rw-r--r-- | apps/speed.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/speed.c b/apps/speed.c index 44c276ab21..b023f2877f 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2448,13 +2448,11 @@ int MAIN(int argc, char **argv) OPENSSL_free(buf2_malloc); #ifndef OPENSSL_NO_RSA for (i = 0; i < RSA_NUM; i++) - if (rsa_key[i] != NULL) - RSA_free(rsa_key[i]); + RSA_free(rsa_key[i]); #endif #ifndef OPENSSL_NO_DSA for (i = 0; i < DSA_NUM; i++) - if (dsa_key[i] != NULL) - DSA_free(dsa_key[i]); + DSA_free(dsa_key[i]); #endif #ifndef OPENSSL_NO_EC |