From a652ba6293ef8d144935dc882b5f0003c987fa22 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Mon, 9 Mar 2020 10:20:30 +0900 Subject: rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet') 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 vecSend; int nChangePosRet = -1; -- cgit v1.2.3