diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-24 00:02:48 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-24 12:12:37 +0000 |
commit | eadaa6aaa3a003d07c4bdf1cfe4f540a94555a8b (patch) | |
tree | a0859196ddead2368999e3547566b1d673640636 | |
parent | Merge pull request #2961 (diff) | |
download | monero-eadaa6aaa3a003d07c4bdf1cfe4f540a94555a8b.tar.xz |
wallet_rpc_server: fix wallet leak on error exit
Makes it easier to debug leaks
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 2 |
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) |