mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Do not assign NULL conditionally in OpenSSL < 1.1, make it always explicit.
This commit is contained in:
@@ -1043,6 +1043,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
||||
if (RSA_generate_key_ex(rsa, key->key_size, e, cb)) {
|
||||
BN_free(e);
|
||||
BN_GENCB_free(cb);
|
||||
cb = NULL;
|
||||
SET_FLAGS(rsa);
|
||||
#if USE_EVP
|
||||
key->keydata.pkey = pkey;
|
||||
@@ -1065,8 +1066,10 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
||||
BN_free(e);
|
||||
if (rsa != NULL)
|
||||
RSA_free(rsa);
|
||||
if (cb != NULL)
|
||||
if (cb != NULL) {
|
||||
BN_GENCB_free(cb);
|
||||
cb = NULL;
|
||||
}
|
||||
return (dst__openssl_toresult(ret));
|
||||
#else
|
||||
RSA *rsa;
|
||||
|
Reference in New Issue
Block a user