mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix map access race in populatedEndpoints
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
parent
9dce786794
commit
eae800acf0
1 changed files with 2 additions and 1 deletions
|
@ -848,8 +848,9 @@ func (sb *sandbox) clearNetworkResources(origEp *endpoint) error {
|
||||||
releaseOSSboxResources(osSbox, ep)
|
releaseOSSboxResources(osSbox, ep)
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(sb.populatedEndpoints, ep.ID())
|
|
||||||
sb.Lock()
|
sb.Lock()
|
||||||
|
delete(sb.populatedEndpoints, ep.ID())
|
||||||
|
|
||||||
if len(sb.endpoints) == 0 {
|
if len(sb.endpoints) == 0 {
|
||||||
// sb.endpoints should never be empty and this is unexpected error condition
|
// sb.endpoints should never be empty and this is unexpected error condition
|
||||||
// We log an error message to note this down for debugging purposes.
|
// We log an error message to note this down for debugging purposes.
|
||||||
|
|
Loading…
Add table
Reference in a new issue