diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-04-14 11:02:42 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2020-04-14 11:02:42 +0200 |
commit | a8192cd76044bb5f82e7ab1d761e34fc21e15432 (patch) | |
tree | 175da65c00b8cf4a3cd3d2771fa32a17d64313d1 /pkg/cgroups/pids.go | |
parent | 5cf64aee11063bc8e7ff22f1365b0bf6b3ab0900 (diff) | |
download | podman-a8192cd76044bb5f82e7ab1d761e34fc21e15432.tar.gz podman-a8192cd76044bb5f82e7ab1d761e34fc21e15432.tar.bz2 podman-a8192cd76044bb5f82e7ab1d761e34fc21e15432.zip |
Fix invalid container path comparison for pid cgroup
This fixes the behavior to return nil for the PIDs cgroup if the
container path is empty.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'pkg/cgroups/pids.go')
-rw-r--r-- | pkg/cgroups/pids.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/cgroups/pids.go b/pkg/cgroups/pids.go index 92f82553b..b2bfebe4d 100644 --- a/pkg/cgroups/pids.go +++ b/pkg/cgroups/pids.go @@ -44,7 +44,7 @@ func (c *pidHandler) Destroy(ctr *CgroupControl) error { // Stat fills a metrics structure with usage stats for the controller func (c *pidHandler) Stat(ctr *CgroupControl, m *Metrics) error { - if ctr.path != "" { + if ctr.path == "" { // nothing we can do to retrieve the pids.current path return nil } |