Skip to content

Commit a652ba6

Browse files
committed
rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure
1 parent 3f82659 commit a652ba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static CTransactionRef SendMoney(interfaces::Chain::Lock& locked_chain, CWallet
343343
CScript scriptPubKey = GetScriptForDestination(address);
344344

345345
// Create and send the transaction
346-
CAmount nFeeRequired;
346+
CAmount nFeeRequired = 0;
347347
std::string strError;
348348
std::vector<CRecipient> vecSend;
349349
int nChangePosRet = -1;

0 commit comments

Comments
 (0)