Add missing null checks in wallet/crypto_tests.cpp

Align code with Bitcoin
This commit is contained in:
Alexander Block 2017-09-20 23:58:29 +02:00
parent 0982d6d3c8
commit 11e27d7af5

View File

@ -44,6 +44,8 @@ bool OldEncrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char>
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
if (!ctx) return false;
bool fOk = true;
EVP_CIPHER_CTX_init(ctx);
@ -70,6 +72,8 @@ bool OldDecrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
if (!ctx) return false;
bool fOk = true;
EVP_CIPHER_CTX_init(ctx);