From caad1add4f383960ca09bb466ddd16652245befe Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 18 Feb 2012 15:36:40 +0100 Subject: [PATCH] Free pwalletdbEncryption after encryping wallet Fixes a memory leak. --- src/wallet.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; } -- 1.7.1