mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
fix: fix potential mutex lifetime issue were we are returning a reference, and then releasing the mutex
This commit is contained in:
parent
85caf8aa34
commit
7f36f122b2
@ -663,8 +663,9 @@ void CDKGSession::VerifyAndJustify(CDKGPendingMessages& pendingMessages)
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto& qc = WITH_LOCK(invCs, return std::move(complaints.at(*m->complaints.begin())));
|
||||
if (qc.complainForMembers[*myIdx]) {
|
||||
LOCK(invCs);
|
||||
if (const auto& qc = complaints.at(*m->complaints.begin());
|
||||
qc.complainForMembers[*myIdx]) {
|
||||
justifyFor.emplace(qc.proTxHash);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user