diff --git a/src/wallet.cpp b/src/wallet.cpp index 1e769d7e6..9d80f8afe 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; }