summaryrefslogtreecommitdiff
path: root/cmd/podman/port.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/port.go')
-rw-r--r--cmd/podman/port.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/port.go b/cmd/podman/port.go
index 1bd2d623e..5753c8e56 100644
--- a/cmd/podman/port.go
+++ b/cmd/podman/port.go
@@ -95,9 +95,12 @@ func portCmd(c *cliconfig.PortValues) error {
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Shutdown(false)
+ defer runtime.DeferredShutdown(false)
containers, err := runtime.Port(c)
+ if err != nil {
+ return err
+ }
for _, con := range containers {
portmappings, err := con.PortMappings()
if err != nil {