From: Pieter Wuille Date: Sat, 18 Feb 2012 14:36:40 +0000 (+0100) Subject: Free pwalletdbEncryption after encryping wallet X-Git-Tag: v0.4.0-unstable~129^2~1^2^2~2^2^2~62 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=caad1add4f383960ca09bb466ddd16652245befe Free pwalletdbEncryption after encryping wallet Fixes a memory leak. --- diff --git a/src/wallet.cpp b/src/wallet.cpp index 43fb6b6..9f7422d 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -183,7 +183,7 @@ bool CWallet::EncryptWallet(const string& 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; }