summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-08-16 10:58:34 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-16 15:12:53 +0000
commitfee9f180fe74b99b408c3c26be12ab25160e3ff1 (patch)
treea6431dd0a7cffb5f779304a017ac1c3281a1026c /cmd/podman
parentdda3a742f2e30398c3824fa06a1ff3e899fc2e9d (diff)
downloadpodman-fee9f180fe74b99b408c3c26be12ab25160e3ff1.tar.gz
podman-fee9f180fe74b99b408c3c26be12ab25160e3ff1.tar.bz2
podman-fee9f180fe74b99b408c3c26be12ab25160e3ff1.zip
Fix segfault in top when -l and no args are passed
Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1284 Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/top.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/top.go b/cmd/podman/top.go
index ab29df3ab..7db71ab16 100644
--- a/cmd/podman/top.go
+++ b/cmd/podman/top.go
@@ -85,8 +85,9 @@ func topCmd(c *cli.Context) error {
}
if err != nil {
- return errors.Wrapf(err, "unable to lookup %s", args[0])
+ return errors.Wrapf(err, "unable to lookup requested container")
}
+
conStat, err := container.State()
if err != nil {
return errors.Wrapf(err, "unable to look up state for %s", args[0])