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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user