From bbe382bec4b24d8aee09570f2c3920cc1c9710ca Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 6 Feb 2014 03:18:12 -0800 Subject: [PATCH] Check for nil information return Fixes #3912 Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- networkdriver/lxc/driver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/networkdriver/lxc/driver.go b/networkdriver/lxc/driver.go index c767fd2208..3f9c0af011 100644 --- a/networkdriver/lxc/driver.go +++ b/networkdriver/lxc/driver.go @@ -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)