aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-24 00:02:48 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-24 12:12:37 +0000
commiteadaa6aaa3a003d07c4bdf1cfe4f540a94555a8b (patch)
treea0859196ddead2368999e3547566b1d673640636 /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #2961 (diff)
downloadmonero-eadaa6aaa3a003d07c4bdf1cfe4f540a94555a8b.tar.xz
wallet_rpc_server: fix wallet leak on error exit
Makes it easier to debug leaks
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 0482b9dd6..d6cb5bbf1 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -89,6 +89,8 @@ namespace tools
//------------------------------------------------------------------------------------------------------------------------------
wallet_rpc_server::~wallet_rpc_server()
{
+ if (m_wallet)
+ delete m_wallet;
}
//------------------------------------------------------------------------------------------------------------------------------
void wallet_rpc_server::set_wallet(wallet2 *cr)