From fee9f180fe74b99b408c3c26be12ab25160e3ff1 Mon Sep 17 00:00:00 2001 From: haircommander Date: Thu, 16 Aug 2018 10:58:34 -0400 Subject: Fix segfault in top when -l and no args are passed Signed-off-by: haircommander Closes: #1284 Approved by: mheon --- cmd/podman/top.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]) -- cgit v1.2.3-54-g00ecf