mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Prevent container.Kill() from crashing if container.cmd is nil
This commit is contained in:
parent
190e2fa50f
commit
b32436cd2e
1 changed files with 3 additions and 0 deletions
|
@ -356,6 +356,9 @@ func (container *Container) monitor() {
|
|||
}
|
||||
|
||||
func (container *Container) kill() error {
|
||||
if container.cmd == nil {
|
||||
return nil
|
||||
}
|
||||
if err := container.cmd.Process.Kill(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue