mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Fix segfault in top when -l and no args are passed
Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1284 Approved by: mheon
This commit is contained in:

committed by
Atomic Bot

parent
dda3a742f2
commit
fee9f180fe
@ -85,8 +85,9 @@ func topCmd(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
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()
|
conStat, err := container.State()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "unable to look up state for %s", args[0])
|
return errors.Wrapf(err, "unable to look up state for %s", args[0])
|
||||||
|
Reference in New Issue
Block a user