1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix race in get/set HostConfig

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
Alexandr Morozov 2014-06-05 11:17:09 +04:00
parent 0b3fe55442
commit fa7c8d523e

View file

@ -808,11 +808,16 @@ func (container *Container) GetPtyMaster() (*os.File, error) {
}
func (container *Container) HostConfig() *runconfig.HostConfig {
return container.hostConfig
container.Lock()
res := container.hostConfig
container.Unlock()
return res
}
func (container *Container) SetHostConfig(hostConfig *runconfig.HostConfig) {
container.Lock()
container.hostConfig = hostConfig
container.Unlock()
}
func (container *Container) DisableLink(name string) {