diff --git a/src/wallet/test/crypto_tests.cpp b/src/wallet/test/crypto_tests.cpp index 821522247..af93d0856 100644 --- a/src/wallet/test/crypto_tests.cpp +++ b/src/wallet/test/crypto_tests.cpp @@ -44,6 +44,8 @@ bool OldEncrypt(const CKeyingMaterial& vchPlaintext, std::vector 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& vchCiphertext, CKeyingMaterial EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); + if (!ctx) return false; + bool fOk = true; EVP_CIPHER_CTX_init(ctx);