summaryrefslogtreecommitdiff
path: root/pkg/cgroups/cpuset.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-11 21:23:29 +0200
committerGitHub <noreply@github.com>2019-07-11 21:23:29 +0200
commite06561270105a4e801eddce6ffe3d52f8bf23ed6 (patch)
tree700a8e0b1738acae47a9b1ef2c5862f7ee267278 /pkg/cgroups/cpuset.go
parent6db27454061f6a96409aa2e3fbe5e2754adc663e (diff)
parent7b75796a6056e5ef65518c37008a1176417d2797 (diff)
downloadpodman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.tar.gz
podman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.tar.bz2
podman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.zip
Merge pull request #3554 from giuseppe/fix-cgroupfs-cleanup
cgroups: fix a leak when using cgroupfs
Diffstat (limited to 'pkg/cgroups/cpuset.go')
-rw-r--r--pkg/cgroups/cpuset.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/cgroups/cpuset.go b/pkg/cgroups/cpuset.go
index 25d2f7f76..46d0484f2 100644
--- a/pkg/cgroups/cpuset.go
+++ b/pkg/cgroups/cpuset.go
@@ -3,7 +3,6 @@ package cgroups
import (
"fmt"
"io/ioutil"
- "os"
"path/filepath"
"strings"
@@ -77,7 +76,7 @@ func (c *cpusetHandler) Create(ctr *CgroupControl) (bool, error) {
// Destroy the cgroup
func (c *cpusetHandler) Destroy(ctr *CgroupControl) error {
- return os.Remove(ctr.getCgroupv1Path(CPUset))
+ return rmDirRecursively(ctr.getCgroupv1Path(CPUset))
}
// Stat fills a metrics structure with usage stats for the controller