wallet_rpc_server: fix wallet leak on error exit

Makes it easier to debug leaks
This commit is contained in:
moneromooo-monero 2017-12-24 00:02:48 +00:00
parent 7a9a4a6669
commit eadaa6aaa3
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -89,6 +89,8 @@ namespace tools
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
wallet_rpc_server::~wallet_rpc_server() wallet_rpc_server::~wallet_rpc_server()
{ {
if (m_wallet)
delete m_wallet;
} }
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
void wallet_rpc_server::set_wallet(wallet2 *cr) void wallet_rpc_server::set_wallet(wallet2 *cr)