Fix locking in AddressableEndpointState

PiperOrigin-RevId: 338156438
This commit is contained in:
Ghanan Gowripalan 2020-10-20 16:04:45 -07:00 committed by gVisor bot
parent 4da10f873e
commit 2bfdbfd1fd
1 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,8 @@ func (a *AddressableEndpointState) RemovePermanentEndpoint(ep AddressEndpoint) *
return tcpip.ErrInvalidEndpointState
}
a.mu.Lock()
defer a.mu.Unlock()
return a.removePermanentEndpointLocked(addrState)
}