Ensure cs_vNodes is held when using the return value from FindNode
zcash: cherry picked from commit 3c37dc40d39e1a1e56b6b0d3e660626a78656d4f zcash: https://github.com/bitcoin/bitcoin/pull/9626
This commit is contained in:
parent
f60964c374
commit
024a94663c
|
@ -372,6 +372,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
|
|||
return NULL;
|
||||
|
||||
// Look for an existing connection
|
||||
LOCK(cs_vNodes);
|
||||
CNode* pnode = FindNode((CService)addrConnect);
|
||||
if (pnode)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue