Skip to content

Commit f85a694

Browse files
mzumsandepsgreco
authored andcommitted
rpc: Capture potentially large UniValue by ref for rpcdoccheck
Github-Pull: 25237 Rebased-From: 20ff499
1 parent 913a587 commit f85a694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/util.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
597597
throw std::runtime_error(ToString());
598598
}
599599
const UniValue ret = m_fun(*this, request);
600-
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); }));
600+
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); }));
601601
return ret;
602602
}
603603

0 commit comments

Comments
 (0)