aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bignum.h2
-rw-r--r--src/wallet.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bignum.h b/src/bignum.h
index 4143f6003d..a750025f3d 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -243,7 +243,7 @@ public:
std::vector<unsigned char> getvch() const
{
unsigned int nSize = BN_bn2mpi(this, NULL);
- if (nSize < 4)
+ if (nSize <= 4)
return std::vector<unsigned char>();
std::vector<unsigned char> vch(nSize);
BN_bn2mpi(this, &vch[0]);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 1e769d7e61..9d80f8afef 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -191,7 +191,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (!pwalletdbEncryption->TxnCommit())
exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet.
- pwalletdbEncryption->Close();
+ delete pwalletdbEncryption;
pwalletdbEncryption = NULL;
}