mirror of https://github.com/docker/docs.git
Check for nil information return
Fixes #3912 Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
2a1609d618
commit
bbe382bec4
|
@ -353,6 +353,10 @@ func Release(job *engine.Job) engine.Status {
|
||||||
proto string
|
proto string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if containerInterface == nil {
|
||||||
|
return job.Errorf("No network information to release for %s", id)
|
||||||
|
}
|
||||||
|
|
||||||
for _, nat := range containerInterface.PortMappings {
|
for _, nat := range containerInterface.PortMappings {
|
||||||
if err := portmapper.Unmap(nat); err != nil {
|
if err := portmapper.Unmap(nat); err != nil {
|
||||||
log.Printf("Unable to unmap port %s: %s", nat, err)
|
log.Printf("Unable to unmap port %s: %s", nat, err)
|
||||||
|
|
Loading…
Reference in New Issue