Lock concurrent access to remove map during Daemon restore

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d665ca8dc053838c5d4d284e13c0f166cd51df6b
Component: engine
This commit is contained in:
Darren Stahl
2016-08-29 16:58:01 -07:00
parent 99413dbbab
commit 0e11a21138
+2
View File
@@ -201,7 +201,9 @@ func (daemon *Daemon) restore() error {
restartContainers[c] = make(chan struct{})
mapLock.Unlock()
} else if c.HostConfig != nil && c.HostConfig.AutoRemove {
mapLock.Lock()
removeContainers[c.ID] = c
mapLock.Unlock()
}
}