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/s_server.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/s_server.c')
-rw-r--r-- | apps/s_server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index 298e665d97..97aa23da19 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -3180,8 +3180,7 @@ static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength) } if (!BN_set_word(bn, RSA_F4) || ((rsa_tmp = RSA_new()) == NULL) || !RSA_generate_key_ex(rsa_tmp, keylength, bn, NULL)) { - if (rsa_tmp) - RSA_free(rsa_tmp); + RSA_free(rsa_tmp); rsa_tmp = NULL; } if (!s_quiet) { |