1
0
Fork 0
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:
Solomon Hykes 2013-03-23 19:51:35 -07:00
parent 190e2fa50f
commit b32436cd2e

View file

@ -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
}