2
0
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:
Petr Mensik
2018-02-24 10:47:35 -08:00
committed by Ondřej Surý
parent 01cc622e7b
commit edaafacf36
4 changed files with 7 additions and 5 deletions

View File

@@ -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;