aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-23 14:20:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-23 15:38:00 +0000
commitaee7a4e3642e384c05d9721deb449b39f91857eb (patch)
treed8fa02f8f1588d7cb934b16866dd14cd9eaa17c5 /src/wallet
parentwindows_service: fix memory leak (diff)
downloadmonero-aee7a4e3642e384c05d9721deb449b39f91857eb.tar.xz
wallet_rpc_server: do not use RPC data if the call failed
Found by codacy.com
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_rpc_server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 0eb09b9f1..d7dc2914e 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -2891,7 +2891,8 @@ namespace tools
cryptonote::COMMAND_RPC_GET_HEIGHT::response hres;
hres.height = 0;
bool r = wal->invoke_http_json("/getheight", hreq, hres);
- wal->set_refresh_from_block_height(hres.height);
+ if (r)
+ wal->set_refresh_from_block_height(hres.height);
crypto::secret_key dummy_key;
try {
wal->generate(wallet_file, req.password, dummy_key, false, false);