Free pwalletdbEncryption after encryping wallet

Fixes a memory leak.
pull/2/merge
Pieter Wuille 13 years ago
parent 2d36b60f92
commit fcfd7ff8f8

@ -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;
}

Loading…
Cancel
Save