aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2020-03-09 10:20:30 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2020-03-09 10:20:41 +0900
commita652ba6293ef8d144935dc882b5f0003c987fa22 (patch)
treed6cc10bb2b861a228345adfe5217002c17c727f6
parent3f826598a42dcc707b58224e94c394e30a42ceee (diff)
downloadbitcoin-a652ba6293ef8d144935dc882b5f0003c987fa22.tar.xz
rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index d9d92f8984..d4a1c475a7 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -343,7 +343,7 @@ static CTransactionRef SendMoney(interfaces::Chain::Lock& locked_chain, CWallet
CScript scriptPubKey = GetScriptForDestination(address);
// Create and send the transaction
- CAmount nFeeRequired;
+ CAmount nFeeRequired = 0;
std::string strError;
std::vector<CRecipient> vecSend;
int nChangePosRet = -1;