mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 06:08:15 +00:00
getPeer() had a small potential to be unsafe.
This commit is contained in:
@ -87,7 +87,7 @@ public:
|
||||
inline SharedPtr<Peer> getPeerNoCache(const Address &zta,const uint64_t now)
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
const SharedPtr<Peer> *ap = _peers.get(zta);
|
||||
const SharedPtr<Peer> *const ap = _peers.get(zta);
|
||||
if (ap) {
|
||||
(*ap)->use(now);
|
||||
return *ap;
|
||||
|
Reference in New Issue
Block a user