if (prov != NULL)
ossl_provider_up_ref(prov);
+ if (!evp_cipher_cache_constants(cipher)) {
+ EVP_CIPHER_free(cipher);
+ ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
+ cipher = NULL;
+ }
+
return cipher;
}
evp_cipher_from_dispatch, evp_cipher_up_ref,
evp_cipher_free);
- if (cipher != NULL && !evp_cipher_cache_constants(cipher)) {
- EVP_CIPHER_free(cipher);
- cipher = NULL;
- }
return cipher;
}