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

Merge pull request from crosbymichael/fix-release-panic

Check for nil information return
This commit is contained in:
unclejack 2014-02-06 19:39:07 +02:00
commit 1a12e9fbc6

View file

@ -353,6 +353,10 @@ func Release(job *engine.Job) engine.Status {
proto string
)
if containerInterface == nil {
return job.Errorf("No network information to release for %s", id)
}
for _, nat := range containerInterface.PortMappings {
if err := portmapper.Unmap(nat); err != nil {
log.Printf("Unable to unmap port %s: %s", nat, err)