Fix race in get/set HostConfig
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4) Upstream-commit: fa7c8d523e8d899ade547fcaacc34a739ab5044f Component: engine
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user