mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
locking: fix a few small issues uncovered by -Wthread-safety
- rpcwallet: No need to lock twice here - openssl: Clang doesn't understand selective lock/unlock here. Ignore it. - CNode: Fix a legitimate (though very unlikely) locking bug.
This commit is contained in:
parent
a496e11d7c
commit
60457d3c2f
3 changed files with 4 additions and 3 deletions
|
|
@ -2033,8 +2033,10 @@ void CNode::EndMessage() UNLOCK_FUNCTION(cs_vSend)
|
|||
Fuzz(GetArg("-fuzzmessagestest", 10));
|
||||
|
||||
if (ssSend.size() == 0)
|
||||
{
|
||||
LEAVE_CRITICAL_SECTION(cs_vSend);
|
||||
return;
|
||||
|
||||
}
|
||||
// Set the size
|
||||
unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
|
||||
WriteLE32((uint8_t*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], nSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue